Guest User

Untitled

a guest
Apr 12th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. require File.join(File.dirname(__FILE__), "helper")
  2.  
  3. Story "View Home Page", %{
  4. As a user
  5. I want to view my home page
  6. So that I can get a birds eye view of the system
  7. }, :type => RailsStory do
  8.  
  9. Scenario "Publisher with no videos" do
  10. Given "a company" do
  11. @company = Company.create! :name => "No videos"
  12. end
  13.  
  14. And "a publisher belonging to that company" do
  15. @user = User.create! :login => "novideos", :password => "test", :password_confirmation => "test",
  16. :email => "novideos@twistage.com", :company => @company
  17. @user.activate
  18. end
  19.  
  20. And "logged in as that user" do
  21. post "/sessions", :login => "novideos", :password => "test"
  22. end
  23.  
  24. When "visiting /" do
  25. get_via_redirect "/"
  26. end
  27.  
  28. Then "viewer should see", "companies/show_initial" do |template|
  29. response.should render_template(template)
  30. end
  31. end
  32. end
Add Comment
Please, Sign In to add comment