Created
October 31, 2012 21:36
-
-
Save supernullset/3990058 to your computer and use it in GitHub Desktop.
minitest integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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