Skip to content

Commit

Permalink
Make testing suite running and pass in Windows
Browse files Browse the repository at this point in the history
thanks @bf4 give many help and suggestion, original PR rails-api#1014
  • Loading branch information
Eric-Guo committed Aug 21, 2015
1 parent 90bff2f commit 30463f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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]
6 changes: 5 additions & 1 deletion test/generators/serializer_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ def test_generates_attributes_and_associations
def test_with_no_attributes_does_not_add_extra_space
run_generator ["account"]
assert_file "app/serializers/account_serializer.rb" do |content|
assert_no_match /\n\nend/, content
if RUBY_PLATFORM =~ /mingw/
assert_no_match /\r\n\r\nend/, content
else
assert_no_match /\n\nend/, content
end
end
end
end

0 comments on commit 30463f8

Please sign in to comment.