Skip to content

Instantly share code, notes, and snippets.

@supernullset
Created October 31, 2012 21:36
Show Gist options
  • Save supernullset/3990058 to your computer and use it in GitHub Desktop.
Save supernullset/3990058 to your computer and use it in GitHub Desktop.
minitest integration
require "minitest_helper"
describe "Root path acceptance test" do
before do
@company1 = create(:awesome_sauce_llc, featured: true)
@company2 = create(:better_than_you_inc, featured: true)
end
describe "when not logged in" do
before { visit root_path }
it { current_path.must_equal "/" }
it { page.must have_selector("html") }
it { page.wont have_content("Dashboard") }
it { page.must have_content("Awesome Sauce") }
it { page.must have_content("Better Than You") }
end
describe "when logged in" do
let(:investor) { create(:investment_profile).user }
let(:identity) { create(:identity, user: investor) }
before do
login identity
visit root_path
end
it { current_path.must_equal "/" }
it { page.must have_content("Dashboard") }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment