mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Make testing suite running and pass in Windows
thanks @bf4 give many help and suggestion, original PR https://github.com/rails-api/active_model_serializers/pull/1014
This commit is contained in:
parent
90bff2f15b
commit
30463f88fa
3
Gemfile
3
Gemfile
@ -15,3 +15,6 @@ if version == "master"
|
||||
else
|
||||
gem "rails", "~> #{version}.0"
|
||||
end
|
||||
|
||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||
|
||||
@ -46,7 +46,11 @@ class SerializerGeneratorTest < Rails::Generators::TestCase
|
||||
def test_with_no_attributes_does_not_add_extra_space
|
||||
run_generator ["account"]
|
||||
assert_file "app/serializers/account_serializer.rb" do |content|
|
||||
if RUBY_PLATFORM =~ /mingw/
|
||||
assert_no_match /\r\n\r\nend/, content
|
||||
else
|
||||
assert_no_match /\n\nend/, content
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user