Merge pull request #649 from airblade/fix_name_error_in_json_version_spec
Fix name error in json version spec
This commit is contained in:
commit
84bedae4bc
|
@ -1,6 +1,8 @@
|
|||
if JsonVersion.table_exists?
|
||||
require 'rails_helper'
|
||||
|
||||
require 'rails_helper'
|
||||
# The `json_versions` table tests postgres' `json` data type. So, that
|
||||
# table is only created when testing against postgres and ActiveRecord >= 4.
|
||||
if JsonVersion.table_exists?
|
||||
|
||||
describe JsonVersion, :type => :model do
|
||||
it "should include the `VersionConcern` module to get base functionality" do
|
||||
|
|
|
@ -442,7 +442,7 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
should 'handle decimals' do
|
||||
assert_in_delta 2.71828, @previous.a_decimal, 0.00001
|
||||
assert_in_delta 2.7183, @previous.a_decimal, 0.0001
|
||||
end
|
||||
|
||||
should 'handle datetimes' do
|
||||
|
@ -484,7 +484,7 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase
|
|||
assert_equal 'The quick brown fox', @last.reify.a_text
|
||||
assert_equal 42, @last.reify.an_integer
|
||||
assert_in_delta 153.01, @last.reify.a_float, 0.001
|
||||
assert_in_delta 2.71828, @last.reify.a_decimal, 0.00001
|
||||
assert_in_delta 2.7183, @last.reify.a_decimal, 0.0001
|
||||
assert_equal @date_time.to_time.utc.to_i, @last.reify.a_datetime.to_time.utc.to_i
|
||||
assert_equal @time.utc.to_i, @last.reify.a_time.utc.to_i
|
||||
assert_equal @date, @last.reify.a_date
|
||||
|
|
Loading…
Reference in New Issue