Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some updates

  • Loading branch information...
commit 89bc232688cc02b35917db66bf393b9b1a60d5e1 1 parent 7322429
Dimitar Haralanov authored
View
5 .travis.yml
@@ -0,0 +1,5 @@
+language: ruby
+rvm:
+ - 1.9.3
+# uncomment this line if your project needs to run something other than `rake`:
+# script: bundle exec rspec spec
View
2  config/environments/development.rb
@@ -27,5 +27,5 @@
config.assets.compress = false
# Expands the lines which load the assets
- config.assets.debug = true
+ config.assets.debug = false
end
View
1  features/create_movie.feature
@@ -4,6 +4,7 @@ Feature: Create movie
As a site administrator
I want to create a movie in a specific genre
+ @javascript
Scenario: Create movie in genre
Given a genre named Comedy
When I create a movie Caddyshack in the Comedy genre
View
1  features/step_definitions/create_movie_steps.rb
@@ -3,6 +3,7 @@
end
When /^I create a movie Caddyshack in the Comedy genre$/ do
+ set_speed(:slow)
visit movies_path
click_link "Add Movie"
fill_in "Title", :with => "Caddyshack"
View
25 features/support/throttle.rb
@@ -0,0 +1,25 @@
+require 'selenium-webdriver'
+
+module ::Selenium::WebDriver::Firefox
+ class Bridge
+ attr_accessor :speed
+
+ def execute(*args)
+ result = raw_execute(*args)['value']
+ case speed
+ when :slow
+ sleep 0.3
+ when :medium
+ sleep 0.1
+ end
+ result
+ end
+ end
+end
+
+def set_speed(speed)
+ begin
+ page.driver.browser.send(:bridge).speed=speed
+ rescue
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.