Skip to content

Commit

Permalink
Update specs to use RSpec expectation syntax
Browse files Browse the repository at this point in the history
The specs were updated automatically with the transpec gem:
https://github.com/yujinakayama/transpec
  • Loading branch information
anselmbradford authored and monfresh committed Apr 26, 2014
1 parent 8d9592a commit b5e401f
Show file tree
Hide file tree
Showing 24 changed files with 429 additions and 190 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Expand Up @@ -77,6 +77,6 @@ end

group :development, :test do
#gem "teaspoon" #enable teaspoon to use JasmineJS for performing unit testing on JS code
gem "rspec-rails", ">= 2.12.2"
gem "rspec-rails", ">= 2.14"
gem 'yard' #for code documentation
end
end
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -353,7 +353,7 @@ DEPENDENCIES
rails (= 3.2.17)
rails_12factor
requirejs-rails (= 0.9.1)
rspec-rails (>= 2.12.2)
rspec-rails (>= 2.14)
sass-rails (~> 3.2.3)
selectivizr-rails
sentry-raven!
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/controllers/home_controller_spec.rb
Expand Up @@ -5,7 +5,7 @@
describe "GET 'index'" do
it "returns http success" do
get 'index'
response.should be_success
expect(response).to be_success
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/organizations_controller_spec.rb
Expand Up @@ -6,7 +6,7 @@
it "returns 200 status code" do
VCR.use_cassette('all_results') do
get :index
response.code.should eq("200")
expect(response.code).to eq("200")
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/status_controller_spec.rb
Expand Up @@ -8,7 +8,7 @@
it "returns success" do
get "get_status"
body = JSON.parse(response.body)
body["status"].should == "ok"
expect(body["status"]).to eq("ok")
end
end

Expand Down Expand Up @@ -38,7 +38,7 @@

get "get_status"
body = JSON.parse(response.body)
body["status"].should == "API did not respond"
expect(body["status"]).to eq("API did not respond")
end
end
end
Expand Down
10 changes: 5 additions & 5 deletions spec/features/details/address_formatting_spec.rb
Expand Up @@ -6,11 +6,11 @@
before(:each) { visit('/organizations/521d32ff1974fcdb2b00126c') }

it "does not include the physical address header" do
page.should_not have_content("Physical Address")
expect(page).not_to have_content("Physical Address")
end

it "does not include a Google Maps directions link" do
page.should_not have_content('Directions')
expect(page).not_to have_content('Directions')
end
end

Expand All @@ -22,18 +22,18 @@
end

it "includes the address header" do
page.should have_content("Address")
expect(page).to have_content("Address")
end

it "includes the street address" do
page.should have_content("2013 Avenue of the fellows")
expect(page).to have_content("2013 Avenue of the fellows")
end

it "includes a Google Maps directions link to the address" do
string = "https://maps.google.com/maps?saddr=current+location"
string << "&daddr=2013 Avenue of the fellows, Suite 100,"
string << " Burlington, VT 05201"
page.should have_link('Directions', :href => string)
expect(page).to have_link('Directions', :href => string)
end
end

Expand Down
14 changes: 7 additions & 7 deletions spec/features/details/location_details_spec.rb
Expand Up @@ -6,11 +6,11 @@
it "includes address elements" do
search_for_maceo
visit_details
page.should have_content("Mailing Address")
page.should have_content("Physical Address")
page.should have_content("2013 Avenue of the fellows")
page.should have_content("90210")
page.should have_content("05201")
expect(page).to have_content("Mailing Address")
expect(page).to have_content("Physical Address")
expect(page).to have_content("2013 Avenue of the fellows")
expect(page).to have_content("90210")
expect(page).to have_content("05201")
end
end

Expand All @@ -20,8 +20,8 @@
visit_details
find_link("maceo@parker.com")
find_link("a", :text=>"Back").click
page.should have_selector("#list-view")
page.find(".agency").should have_link("SanMaceo Example Agency.")
expect(page).to have_selector("#list-view")
expect(page.find(".agency")).to have_link("SanMaceo Example Agency.")
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/features/details/market_details_spec.rb
Expand Up @@ -17,8 +17,8 @@

xscenario 'return to search results via details page', :vcr do
find_link("Result list").click
page.find("#search-summary").
should have_content("1 of 1 result matching 'maceo'")
expect(page.find("#search-summary")).
to have_content("1 of 1 result matching 'maceo'")
end
end

Expand Down

0 comments on commit b5e401f

Please sign in to comment.