Here is the code for the tourist.
class SimpleTest < Tourist
def test_login
# visit "#{@host}/users/sign_in"
# visit "http://lvh.me:3000/users/sign_in"
visit "http://facebook.com"
assert_contain "entrance"
fill_in "Email", :with => "[email protected]"
fill_in "Password", :with => "secret"
click_button "Enter"
assert_contain "sachin"
assert_match /\/dashboard/, current_page.url
end
end
Now the funny part is, whether the local server is running or not, or even if I visit the facebook.com, it always runs and shows the report with nothing error. What is this?? Driving me insane lol??
○ tourbus -c 1 -n 1 simple_test jruby-1.6.4
2011-08-29 00:29:40 TourBus: Starting 1 runs: 1x1 of simple_test
2011-08-29 00:29:40 TourBus: All Runners are ready -- STARTING!
2011-08-29 00:29:40 Runner #1: Ready to run Runner
2011-08-29 00:29:40 Runner #1: Starting Runner run 1/1
2011-08-29 00:29:40 Runner #1: Starting run 1/1 of Tourist simple_test
2011-08-29 00:29:40 Runner #1: Finished run 1/1 of Tourist simple_test
2011-08-29 00:29:40 Runner #1: Finished Runner run 1/1
2011-08-29 00:29:40 Runner #1: Finished all Runner tourists.
2011-08-29 00:29:40 TourBus: Runner Finished!
2011-08-29 00:29:40 TourBus: Runner finished in 0.010 seconds
2011-08-29 00:29:40 TourBus: Runner Finished! runs,passes,fails,errors: 1,1,0,0
2011-08-29 00:29:40 TourBus: Benchmark for runner 1: 0.009000 0.000000 0.009000 ( 0.009000)
2011-08-29 00:29:40 TourBus: Initializing 1 Runners...
2011-08-29 00:29:40 TourBus: --------------------------------------------------------------------------------
2011-08-29 00:29:40 TourBus: 1 runs: 1x1 of simple_test
2011-08-29 00:29:40 TourBus: All Runners finished.
2011-08-29 00:29:40 TourBus: Total Tourists: 1
2011-08-29 00:29:40 TourBus: Total Tests: 1
2011-08-29 00:29:40 TourBus: Total Passes: 1
2011-08-29 00:29:40 TourBus: Total Fails: 0
2011-08-29 00:29:40 TourBus: Total Errors: 0
2011-08-29 00:29:40 TourBus: Elapsed Time: 0.0230000019073486
2011-08-29 00:29:40 TourBus: Speed: 43.478 tours/sec
2011-08-29 00:29:40 TourBus: --------------------------------------------------------------------------------