Comments (11)
@moonglum -- I believe this is the same issue that was reported in rspec/rspec-mocks#619 and fixed in rspec/rspec-core#1372.
Can you try updating the the master branches of the rspec repos and seeing if that fixes it?
Thanks!
from rspec-its.
@myronmarston I tried updating both rspec and rspec-its to master
, this doesn't change it unfortunately.
from rspec-its.
@moonglum so the main RSpec is really just a host for specifying the other RSpec gems. Since the github repo version for it is '3.0.0.beta2', it will only attempt to require the same version of the other RSpec gems.
Can you try again after adding the following to your Gemfile:
gem 'rspec-core', git: 'git://github.com/rspec/rspec-core'
from rspec-its.
If I add this line, I get the following error when I run it via either rake
or directly:
NoMethodError: undefined method `require_rspec_support' for RSpec::Support:Module
/Users/moonglum/.rvm/gems/ruby-2.1.1/bundler/gems/rspec-core-e204adc93d07/lib/rspec/core/rake_task.rb:2:in `<top (required)>'
/Users/moonglum/Code/ashikawa-core/Rakefile:4:in `require'
/Users/moonglum/Code/ashikawa-core/Rakefile:4:in `<top (required)>'
/Users/moonglum/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
/Users/moonglum/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
from rspec-its.
rspec-core HEAD relies on changes in rspec-support HEAD that were not present in the beta2 release. You'll need to add gem 'rspec-support', git: 'git://github.com/rspec/rspec-support'
to your Gemfile as well. In general, the repos are developed together so it may be best to use HEAD of all of them:
%w[ core mocks expectations support ].each do |name|
gem "rspec-#{name}", github: "rspec/rspec-#{name}"
end
from rspec-its.
Ok, thank you! I've changed that now. This leads to a different set of errors [Build on Travis is in progress]:
1) Ashikawa::Core::ResourceNotFound to_s should include "was not found"
Failure/Error: its(:to_s) { should include 'was not found' }
expected "to_s" to include "was not found"
# ./spec/unit/exception_spec.rb:32:in `block (2 levels) in <top (required)>'
[...]
10) Ashikawa::Core::Configuration adapter
Failure/Error: its(:adapter) { should be_nil }
NoMethodError:
undefined method `adapter' for :adapter:Symbol
# ./spec/unit/configuration_spec.rb:15:in `block (2 levels) in <top (required)>'
Seems like the its
block executes the expectations on the symbol given as the argument to its
.
from rspec-its.
You've run into #12, which I reported recently but hasn't yet been fixed.
In the mean time, either of these should work:
- Change the argument passed to
its
from a symbol to a string. - Pin your rspec-core to a ref from after the mock lifecycle fix but before we changed
describe :symbol
to makesubject
refer to that symbol. For example, if you addref: '5fe4dc352255a6396f521f1d0350cb32921462b7'
to therspec-core
entry in your Gemfile.
from rspec-its.
Ok, thank you! I will wait for the fix of rspec-its
and then report if everything is working – and then close this issue! For that time I will stay on the 2.99 release. Looking forward to switching to 3.0 though, especially for verifying doubles 😄
from rspec-its.
Not sure where to tell it, but I had the very same error while using an around
hook.
I changed to before
, works fine now
from rspec-its.
@apneadiving -- that sounds like an rspec-core issue. Can you open an issue there with an example of what you were doing?
from rspec-its.
@myronmarston ok done here: rspec/rspec-core#1598
from rspec-its.
Related Issues (20)
- Test failing due to change in RSpec's execution_result method HOT 2
- RSpec 3 is being released tomorrow HOT 1
- Accepting method arguments HOT 15
- It's not possible to focus on an `its` assertion. HOT 12
- 'its' for expecting exceptions HOT 2
- deep hash support HOT 3
- Should use `Object#public_send` instead of `Object#send`. HOT 16
- described_class is changed when using its HOT 1
- Possible to mark "its" examples as pending? HOT 1
- are_expected undefined HOT 3
- Please update to compatible with RSpec 3.2 HOT 2
- Link to documentation from Rubygems is wrong HOT 8
- rspec-its breaking InSpec HOT 4
- its against BasicObject fails to generate description HOT 1
- its([:attr]) has the proper value, its(:attr) does not HOT 1
- When requiring the Ruby's timeout library I can no longer retrieve a nested attribute named timeout on an OpenStruct HOT 3
- irb: warn: can't alias context from irb_context. HOT 3
- Is using `its` still recommended? HOT 4
- Wrong number of arguments HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rspec-its.