Permalink
Browse files

passing integration suite for jQuery Mobile feature

  • Loading branch information...
1 parent fb5e674 commit 9129b49788b53bbf7a12e48d965ef6e74876e95c @croaky croaky committed Jan 19, 2011
View
@@ -15,9 +15,12 @@ gem "dynamic_form"
group :development, :test do
gem "rspec-rails", "~> 2.4.0"
gem "ruby-debug", :platforms => :mri_18
+ gem "ruby-debug19", :platforms => :mri_19
end
group :test, :cucumber do
+ gem "akephalos", :git => "git://github.com/thoughtbot/akephalos.git"
+
gem "cucumber-rails"
gem "factory_girl_rails"
gem "bourne"
View
@@ -1,3 +1,11 @@
+GIT
+ remote: git://github.com/thoughtbot/akephalos.git
+ revision: b2f056db59844209dac4c77ca386e7ef36f8f560
+ specs:
+ akephalos (0.2.4)
+ capybara (~> 0.3.8)
+ jruby-jars
+
GEM
remote: http://rubygems.org/
specs:
@@ -28,80 +36,80 @@ GEM
activemodel (= 3.0.3)
activesupport (= 3.0.3)
activesupport (3.0.3)
- arel (2.0.4)
+ archive-tar-minitar (0.5.2)
+ arel (2.0.7)
bourne (1.0)
mocha (= 0.9.8)
builder (2.1.2)
- capybara (0.4.0)
- celerity (>= 0.7.9)
+ capybara (0.3.9)
culerity (>= 0.2.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
- selenium-webdriver (>= 0.0.27)
- xpath (~> 0.1.2)
- celerity (0.8.4)
- childprocess (0.1.4)
+ selenium-webdriver (>= 0.0.3)
+ childprocess (0.1.6)
ffi (~> 0.6.3)
columnize (0.3.2)
configuration (1.2.0)
- cucumber (0.9.4)
- builder (~> 2.1.2)
+ cucumber (0.10.0)
+ builder (>= 2.1.2)
diff-lcs (~> 1.1.2)
- gherkin (~> 2.2.9)
+ gherkin (~> 2.3.2)
json (~> 1.4.6)
term-ansicolor (~> 1.0.5)
cucumber-rails (0.3.2)
cucumber (>= 0.8.0)
- culerity (0.2.12)
+ culerity (0.2.14)
database_cleaner (0.6.0)
diff-lcs (1.1.2)
dynamic_form (1.1.3)
erubis (2.6.6)
abstract (>= 1.0.0)
- factory_girl (1.3.2)
- factory_girl_rails (1.0)
+ factory_girl (1.3.3)
+ factory_girl_rails (1.0.1)
factory_girl (~> 1.3)
- rails (>= 3.0.0.beta4)
+ railties (>= 3.0.0)
fakeweb (1.3.0)
ffi (0.6.3)
rake (>= 0.8.7)
flutie (1.1.3)
- formtastic (1.2.0)
+ formtastic (1.2.3)
actionpack (>= 2.3.7)
activesupport (>= 2.3.7)
- i18n (>= 0.4.0)
- gherkin (2.2.9)
+ i18n (~> 0.4)
+ gherkin (2.3.3)
json (~> 1.4.6)
- term-ansicolor (~> 1.0.5)
- haml (3.0.24)
- high_voltage (0.9.2)
- hoptoad_notifier (2.3.12)
+ haml (3.0.25)
+ high_voltage (0.9.3)
+ hoptoad_notifier (2.4.2)
activesupport
builder
- i18n (0.4.2)
+ i18n (0.5.0)
+ jruby-jars (1.5.6)
json (1.4.6)
json_pure (1.4.6)
launchy (0.3.7)
configuration (>= 0.0.5)
rake (>= 0.8.1)
linecache (0.43)
- mail (2.2.10)
+ linecache19 (0.5.11)
+ ruby_core_source (>= 0.1.4)
+ mail (2.2.14)
activesupport (>= 2.3.6)
- i18n (~> 0.4.1)
+ i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
mocha (0.9.8)
rake
nokogiri (1.4.4)
- pg (0.10.0)
+ pg (0.10.1)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack (>= 1.0.0)
- rack-test (0.5.6)
+ rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.3)
actionmailer (= 3.0.3)
@@ -135,26 +143,35 @@ GEM
ruby-debug-base (~> 0.10.4.0)
ruby-debug-base (0.10.4)
linecache (>= 0.3)
+ ruby-debug-base19 (0.11.24)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby_core_source (>= 0.1.4)
+ ruby-debug19 (0.11.6)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby-debug-base19 (>= 0.11.19)
+ ruby_core_source (0.1.4)
+ archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.4)
- selenium-webdriver (0.1.0)
- childprocess (= 0.1.4)
+ selenium-webdriver (0.1.2)
+ childprocess (~> 0.1.5)
ffi (~> 0.6.3)
json_pure
rubyzip
shoulda (2.11.3)
term-ansicolor (1.0.5)
- thor (0.14.4)
+ thor (0.14.6)
timecop (0.3.5)
treetop (1.4.9)
polyglot (>= 0.3.1)
- tzinfo (0.3.23)
- xpath (0.1.2)
- nokogiri (~> 1.3)
+ tzinfo (0.3.24)
PLATFORMS
ruby
DEPENDENCIES
+ akephalos!
bourne
capybara
cucumber-rails
@@ -174,6 +191,7 @@ DEPENDENCIES
rails (>= 3.0)
rspec-rails (~> 2.4.0)
ruby-debug
+ ruby-debug19
shoulda
timecop
treetop
@@ -1,4 +1,8 @@
-<script src="//code.jquery.com/jquery-1.4.4.min.js"></script>
-<script src="//code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
+<% if Rails.env.test? %>
+ <%= javascript_include_tag "jquery", "jquery-mobile" %>
+<% else %>
+ <script src="//code.jquery.com/jquery-1.4.4.min.js"></script>
+ <script src="//code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
+<% end %>
<%= render :partial => 'shared/google_analytics' %>
View
@@ -52,13 +52,10 @@
# after each scenario, which can lead to hard-to-debug failures in
# subsequent scenarios. If you do this, we recommend you create a Before
# block that will explicitly put your database in a known state.
-Cucumber::Rails::World.use_transactional_fixtures = true
+Cucumber::Rails::World.use_transactional_fixtures = false
# How to clean your database when transactions are turned off. See
# http://github.com/bmabey/database_cleaner for more info.
if defined?(ActiveRecord::Base)
- begin
- require 'database_cleaner'
- DatabaseCleaner.strategy = :truncation
- rescue LoadError => ignore_if_database_cleaner_not_present
- end
+ require 'database_cleaner'
+ DatabaseCleaner.strategy = :truncation
end
@@ -4,7 +4,7 @@ Feature: Visitor views talks
As a college student
I want to see the talk abstract, the speaker bio, and resources
- Scenario: Student views talks
+ Background:
Given the following talks exist:
| name | speaker name | speaker bio | abstract |
| Git | Tom Preston-Werner | Github dude. | Version control is your friend. |
@@ -13,6 +13,8 @@ Feature: Visitor views talks
| name | url | description | talk |
| Github | http://github.com | Bad-ass. | name: Git |
| jQuery | http://jquery.com | Bad-ass. | name: jQuery |
+
+ Scenario: Student views talks
When I go to the talks page
Then I should see the following talks:
| name |
@@ -21,18 +23,11 @@ Feature: Visitor views talks
@akephalos @mobile
Scenario: Student views talks on mobile phone
- Given the following talks exist:
- | name | speaker name | speaker bio | abstract |
- | Git | Tom Preston-Werner | Github dude. | Version control is your friend. |
- | jQuery | John Resig | jQuery dude. | CSS selectors are your friends. |
- And the following resources exist:
- | name | url | description | talk |
- | Github | http://github.com | Bad-ass. | name: Git |
- | jQuery | http://jquery.com | Bad-ass. | name: jQuery |
When I go to the home page
And I follow "Talks"
And I follow "Git"
Then I should see the "Git" talk
- When I follow "Back"
+ When I go to the home page
+ And I follow "Talks"
And I follow "jQuery"
Then I should see the "jQuery" talk
Oops, something went wrong.

0 comments on commit 9129b49

Please sign in to comment.