S
shatorkin
Hi all.
Does anybody use Rspec with Oracle? I have RoR app + Oracle DB. I use
Rspec 0.9.4.
I have installed Rspec plugin and generated spec for model Country.
If I use "@countries = Country.new" in my spec I get
"ArgumentError in 'Country should be valid'
block not supplied
/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/kernel.rb:
12:in `describe'"
"@countries = Country.findfirst)" works but "@countries =
Country.new" doesn't work.
I have found some modifications for Rspec 0.9.2 in files
"/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/kernel.rb"
and
"usr/lib/ruby/gems/1.8/gems/rspec-0.9.4/lib/spec/runner/extensions/
kernel.rb"
but those modifications have not helped me.
This is my spec:
"
require File.dirname(__FILE__) + '/../spec_helper'
describe Country do
beforeeach) do
@countries = Country.new
# @countries = Country.findfirst)
end
it "should be valid" do
@countries.should be_valid
end
end
"
Does anybody know how I can use method "new" of model in my Rspec's
files with Oracle?
Thanks.
Does anybody use Rspec with Oracle? I have RoR app + Oracle DB. I use
Rspec 0.9.4.
I have installed Rspec plugin and generated spec for model Country.
If I use "@countries = Country.new" in my spec I get
"ArgumentError in 'Country should be valid'
block not supplied
/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/kernel.rb:
12:in `describe'"
"@countries = Country.findfirst)" works but "@countries =
Country.new" doesn't work.
I have found some modifications for Rspec 0.9.2 in files
"/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/kernel.rb"
and
"usr/lib/ruby/gems/1.8/gems/rspec-0.9.4/lib/spec/runner/extensions/
kernel.rb"
but those modifications have not helped me.
This is my spec:
"
require File.dirname(__FILE__) + '/../spec_helper'
describe Country do
beforeeach) do
@countries = Country.new
# @countries = Country.findfirst)
end
it "should be valid" do
@countries.should be_valid
end
end
"
Does anybody know how I can use method "new" of model in my Rspec's
files with Oracle?
Thanks.