Skip to content

Commit

Permalink
Fix spec failures
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed Oct 8, 2013
1 parent 5f5f10c commit 9ef1cc8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .rspec
@@ -1,4 +1,3 @@
--color
--fail-fast
--order=random
--profile
4 changes: 2 additions & 2 deletions Gemfile
Expand Up @@ -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'
Expand Down
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/integration/config/edit/rails_admin_config_edit_spec.rb
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/integration/rails_admin_spec.rb
Expand Up @@ -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

Expand Down

0 comments on commit 9ef1cc8

Please sign in to comment.