Permalink
Browse files

Fix spec failures

  • Loading branch information...
1 parent 5f5f10c commit 9ef1cc88edc7035f8e3c74ac02cc1e9dccc1ca64 @mshibuya mshibuya committed Oct 8, 2013
View
1 .rspec
@@ -1,4 +1,3 @@
--color
---fail-fast
--order=random
--profile
View
@@ -40,11 +40,11 @@ end
group :test do
gem 'cancan', '>= 1.6'
- gem 'capybara', '~> 1.1'
+ gem 'capybara', '~> 2.0'
gem 'carrierwave', '>= 0.8'
gem 'coveralls', :require => false
gem 'database_cleaner', '~> 1.0.0' # https://github.com/bmabey/database_cleaner/issues/224
- gem 'devise', '>= 2.1'
+ gem 'devise', '~> 2.1'
gem 'dragonfly', '>= 0.9'
gem 'factory_girl', '>= 4.2'
gem 'generator_spec', '>= 0.8'
@@ -99,7 +99,7 @@
describe "POST /admin/players/export :format => :csv" do
it "exports with modified schema" do
page.driver.post(export_path(:model_name => 'player', :schema => @non_default_schema, :csv => true, :all => true, :csv_options => { :generator => { :col_sep => "," } }))
- csv = CSV.parse find('body').text
+ csv = CSV.parse page.driver.response.body
expect(csv[0]).not_to include('Created at')
end
end
@@ -770,7 +770,7 @@ class HelpTest < Tableless
visit edit_path(:model_name => "field_test", :id => @record.id)
expect(find('#field_test_nested_field_tests_attributes_0_title').value).to eq('nested title 1')
should_not have_selector('form .remove_nested_fields')
- expect(find('div#nested_field_tests_fields_blueprint')[:'data-blueprint']).to match(
+ expect(find('div#nested_field_tests_fields_blueprint', :visible => false)[:'data-blueprint']).to match(
/<a[^>]* class="remove_nested_fields"[^>]*>/)
end
end
@@ -779,7 +779,7 @@ class HelpTest < Tableless
it "does not hide fields which are not associated with nesting parent field's model" do
visit new_path(:model_name => "field_test")
should_not have_selector('select#field_test_nested_field_tests_attributes_new_nested_field_tests_field_test_id')
- expect(find('div#nested_field_tests_fields_blueprint')[:'data-blueprint']).to match(
+ expect(find('div#nested_field_tests_fields_blueprint', :visible => false)[:'data-blueprint']).to match(
/<select[^>]* id="field_test_nested_field_tests_attributes_new_nested_field_tests_another_field_test_id"[^>]*>/)
end
end
@@ -34,11 +34,11 @@
# Note: the [href^="/asset... syntax matches the start of a value. The reason
# we just do that is to avoid being confused by rails' asset_ids.
it "loads stylesheets in header" do
- should have_selector('head link[href^="/assets/rails_admin/rails_admin.css"]')
+ should have_selector('head link[href^="/assets/rails_admin/rails_admin.css"]', :visible => false)
end
it "loads javascript files in body" do
- should have_selector('head script[src^="/assets/rails_admin/rails_admin.js"]')
+ should have_selector('head script[src^="/assets/rails_admin/rails_admin.js"]', :visible => false)
end
end

0 comments on commit 9ef1cc8

Please sign in to comment.