Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename y to z in looser typecasting spec to work around bundler/1.9.2…

… issues
  • Loading branch information...
commit 69c19912f46aa25f585d24d7bd6fc07841ee4720 1 parent 89f0c46
@jeremyevans authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 spec/extensions/looser_typecasting_spec.rb
View
10 spec/extensions/looser_typecasting_spec.rb
@@ -4,11 +4,11 @@
before do
@db = Sequel::Database.new({})
def @db.schema(*args)
- [[:id, {}], [:y, {:type=>:float}], [:b, {:type=>:integer}]]
+ [[:id, {}], [:z, {:type=>:float}], [:b, {:type=>:integer}]]
end
@c = Class.new(Sequel::Model(@db[:items]))
@c.instance_eval do
- @columns = [:id, :b, :y]
+ @columns = [:id, :b, :z]
def columns; @columns; end
end
end
@@ -26,14 +26,14 @@ def o.to_i
end
specify "Should use to_f instead of Float() for typecasting floats" do
- proc{@c.new(:y=>'a')}.should raise_error(Sequel::InvalidValue)
+ proc{@c.new(:z=>'a')}.should raise_error(Sequel::InvalidValue)
@db.extend(Sequel::LooserTypecasting)
- @c.new(:y=>'a').y.should == 0.0
+ @c.new(:z=>'a').z.should == 0.0
o = Object.new
def o.to_f
1.0
end
- @c.new(:y=>o).y.should == 1.0
+ @c.new(:z=>o).z.should == 1.0
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.