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 method
`eql' 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:in `module_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:in `describe'
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)>'
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users