0
votes

I've got a simple spec

describe "Workers" do
  describe "user attempts to view workers" do
    context "admin logged in" do

    end
    context "non-logged in user" do
      before do
        visit workers_path
      end

      it "should redirect to home page" do
        page.should have_content 'You are not authorized to access this page.'
      end
    end
  end
end

This passes just fine. If I add save_and_open_page, the test run terminates and the output says "Process finished with exit code 0", but says nothing of the test status.

describe "Workers" do
  describe "user attempts to view workers" do
    context "admin logged in" do

    end
    context "non-logged in user" do
      before do
        visit workers_path
      end

      it "should redirect to home page" do
        save_and_open_page
        page.should have_content 'You are not authorized to access this page.'
      end
    end
  end
end

Capybara: 2.1.0

launchy: 2.3.0

rspec: 2.13.0

rails: 3.2.13

1
In your description, you mention 'save_and_load_page' but in your code you have 'save_and_open_page'. The 'save_and_open_page' is correct.Rebitzele
@Rebitzele - Definitely a typo. Fixing that. ThanksTyler DeWitt

1 Answers

0
votes

Must have been a bad install of launchy. I downgraded to launchy 2.2.0 and everything worked, then I upgraded (back) to launchy 2.3.0 and things seem to be working fine.