Having troubles with rspec and should eql… in a rails 3.1 app
spec has this
User.first.name.should eql(‘admin’)
get this error
.rvm/gems/ruby-1.9.2-p290/gems/remarkable-4.0.0.alpha4/lib/remarkable/
core/macros.rb:15:in method_missing': undefined methodeql’ for
#Class:0xf51ab30 (NoMethodError)
Having troubles with rspec and should eql… in a rails 3.1 app
spec has this
User.first.name.should eql(‘admin’)
get this error
.rvm/gems/ruby-1.9.2-p290/gems/remarkable-4.0.0.alpha4/lib/remarkable/
core/macros.rb:15:in method_missing': undefined methodeql’ for
#Class:0xf51ab30 (NoMethodError)
Please post the example that is failing and the full error message.
Here is another example that is failing due to same problem…
class Currency < ActiveRecord::Base
end
class Bitcoin < Currency
include ActiveRecord::Singleton
default_scope where(:char_code => ‘BTC’)
end
spec:
describe Bitcoin do
…
Bitcoin.instance.char_code.should eql(‘BTC’)
…
end
error:
/home/slava/.rvm/gems/ruby-1.9.2-p290/gems/remarkable-4.0.0.alpha4/lib/
remarkable/core/macros.rb:15:in method_missing': undefined methodeql’ for #Class:0xe314990 (NoMethodError)
from /home/slava/dev/projects/bitcoin-derivatives/spec/models/
bitcoin_spec.rb:4:in block in <top (required)>' from /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/ rspec/core/example_group.rb:142:inmodule_eval’
from /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/
rspec/core/example_group.rb:142:in subclass' from /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/ rspec/core/example_group.rb:129:indescribe’
from /home/slava/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/lib/
rspec/core/dsl.rb:5:in describe' from /home/slava/dev/projects/bitcoin-derivatives/spec/models/ bitcoin_spec.rb:3:in<top (required)>’