Permalink
Browse files

Mock out the recent_jobs API call

  • Loading branch information...
1 parent 437d145 commit 8bf206b3706e77976851f4c8fc831d1dd193e1f5 @rtyler committed Aug 5, 2012
@@ -16,9 +16,9 @@
click_button 'Log in'
end
-
Then /^I should be given a list of jobs$/ do
page.should have_content "Welcome #{username}"
+ page.should have_css('#jobs li.job')
end
Then /^I should be prompted to log in with my username and API key$/ do
@@ -0,0 +1,7 @@
+module SauceTV
+ class API
+ def recent_jobs
+ [{:id => 'test'}]
+ end
+ end
+end
View
@@ -10,7 +10,7 @@ def initialize(username, api_key)
end
def recent_jobs
- []
+ raise NotImplemented
end
end
end
View
@@ -1,3 +1,6 @@
+require 'rubygems'
+
+require 'haml'
require 'sinatra'
require 'saucetv/api'
@@ -4,3 +4,9 @@
SauceLabs.tv
%body
Welcome #{username}
+
+ %ul#jobs
+ - jobs.each do |job|
+ %li.job
+ #{job[:id]}
+

0 comments on commit 8bf206b

Please sign in to comment.