Browse Source

Tests are passing

development
Godwin 10 years ago
parent
commit
a31d3295ab
  1. 865
      Gemfile.lock
  2. 74
      app/assets/javascripts/editor.js.coffee
  3. 1660
      app/controllers/conferences_controller.rb
  4. 1166
      app/helpers/application_helper.rb
  5. 3735
      config/locales/translation-info.yml
  6. 9
      config/paypal.yml
  7. 7
      config/registrations_access.yml
  8. 1063
      features/registration.feature
  9. 478
      features/step_definitions/interface_steps.rb
  10. 74
      features/support/paths.rb
  11. 93
      features/volunteer-registration.feature
  12. 123
      spec/spec_helper.rb

865
Gemfile.lock

@ -1,436 +1,429 @@
GIT GIT
remote: git://github.com/josevalim/rails-footnotes.git remote: git://github.com/josevalim/rails-footnotes.git
revision: 087914beabb56c2e9979f63eeb0183591065dde3 revision: 087914beabb56c2e9979f63eeb0183591065dde3
specs: specs:
rails-footnotes (4.0.2) rails-footnotes (4.0.2)
rails (>= 3.2) rails (>= 3.2)
GIT GIT
remote: git://github.com/svenfuchs/i18n-active_record.git remote: git://github.com/svenfuchs/i18n-active_record.git
revision: 2d9a22b6a4e5d809782cdbfa65b14d9e47aa27fc revision: 2d9a22b6a4e5d809782cdbfa65b14d9e47aa27fc
specs: specs:
i18n-active_record (0.0.2) i18n-active_record (0.0.2)
i18n (>= 0.5.0) i18n (>= 0.5.0)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
actionmailer (4.0.0) actionmailer (4.0.0)
actionpack (= 4.0.0) actionpack (= 4.0.0)
mail (~> 2.5.3) mail (~> 2.5.3)
actionpack (4.0.0) actionpack (4.0.0)
activesupport (= 4.0.0) activesupport (= 4.0.0)
builder (~> 3.1.0) builder (~> 3.1.0)
erubis (~> 2.7.0) erubis (~> 2.7.0)
rack (~> 1.5.2) rack (~> 1.5.2)
rack-test (~> 0.6.2) rack-test (~> 0.6.2)
activemodel (4.0.0) activemodel (4.0.0)
activesupport (= 4.0.0) activesupport (= 4.0.0)
builder (~> 3.1.0) builder (~> 3.1.0)
activerecord (4.0.0) activerecord (4.0.0)
activemodel (= 4.0.0) activemodel (= 4.0.0)
activerecord-deprecated_finders (~> 1.0.2) activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.0) activesupport (= 4.0.0)
arel (~> 4.0.0) arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3) activerecord-deprecated_finders (1.0.3)
activerecord-session_store (0.1.0) activerecord-session_store (0.1.0)
actionpack (>= 4.0.0, < 5) actionpack (>= 4.0.0, < 5)
activerecord (>= 4.0.0, < 5) activerecord (>= 4.0.0, < 5)
railties (>= 4.0.0, < 5) railties (>= 4.0.0, < 5)
activesupport (4.0.0) activesupport (4.0.0)
i18n (~> 0.6, >= 0.6.4) i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2) minitest (~> 4.2)
multi_json (~> 1.3) multi_json (~> 1.3)
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo (~> 0.3.37) tzinfo (~> 0.3.37)
acts_as_list (0.4.0) acts_as_list (0.4.0)
activerecord (>= 3.0) activerecord (>= 3.0)
addressable (2.3.6) addressable (2.3.6)
arel (4.0.2) arel (4.0.2)
attr_required (1.0.0) attr_required (1.0.0)
awesome_print (1.2.0) awesome_print (1.2.0)
bcrypt (3.1.7) bcrypt (3.1.7)
bcrypt (3.1.7-x86-mingw32) bcrypt (3.1.7-x86-mingw32)
better_errors (1.1.0) better_errors (1.1.0)
coderay (>= 1.0.0) coderay (>= 1.0.0)
erubis (>= 2.6.6) erubis (>= 2.6.6)
binding_of_caller (0.7.2) binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
builder (3.1.4) builder (3.1.4)
callsite (0.0.11) callsite (0.0.11)
capistrano (2.15.5) capistrano (2.15.5)
highline highline
net-scp (>= 1.0.0) net-scp (>= 1.0.0)
net-sftp (>= 2.0.0) net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14) net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0) net-ssh-gateway (>= 1.1.0)
capybara (2.4.1) capybara (2.4.1)
mime-types (>= 1.16) mime-types (>= 1.16)
nokogiri (>= 1.3.3) nokogiri (>= 1.3.3)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-test (>= 0.5.4) rack-test (>= 0.5.4)
xpath (~> 2.0) xpath (~> 2.0)
carmen (1.0.1) carmen (1.0.1)
unicode_utils (~> 1.4.0) unicode_utils (~> 1.4.0)
carmen-rails (1.0.1) carmen-rails (1.0.1)
carmen (~> 1.0.0) carmen (~> 1.0.0)
rails rails
carrierwave (0.10.0) carrierwave (0.10.0)
activemodel (>= 3.2.0) activemodel (>= 3.2.0)
activesupport (>= 3.2.0) activesupport (>= 3.2.0)
json (>= 1.7) json (>= 1.7)
mime-types (>= 1.16) mime-types (>= 1.16)
carrierwave-imageoptimizer (1.2.1) carrierwave-imageoptimizer (1.2.1)
carrierwave (~> 0.8) carrierwave (~> 0.8)
image_optimizer (~> 1.2) image_optimizer (~> 1.2)
celluloid (0.15.2) celluloid (0.15.2)
timers (~> 1.1.0) timers (~> 1.1.0)
childprocess (0.5.3) childprocess (0.5.3)
ffi (~> 1.0, >= 1.0.11) ffi (~> 1.0, >= 1.0.11)
chunky_png (1.3.1) chunky_png (1.3.1)
cliver (0.3.2) cliver (0.3.2)
coderay (1.1.0) coderay (1.1.0)
coffee-rails (4.0.1) coffee-rails (4.0.1)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0) railties (>= 4.0.0, < 5.0)
coffee-script (2.3.0) coffee-script (2.3.0)
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.7.1) coffee-script-source (1.7.1)
compass (0.12.7) compass (0.12.7)
chunky_png (~> 1.2) chunky_png (~> 1.2)
fssm (>= 0.2.7) fssm (>= 0.2.7)
sass (~> 3.2.19) sass (~> 3.2.19)
compass-rails (1.1.7) compass-rails (1.1.7)
compass (>= 0.12.2) compass (>= 0.12.2)
sprockets (<= 2.11.0) sprockets (<= 2.11.0)
coveralls (0.7.0) coveralls (0.7.0)
multi_json (~> 1.3) multi_json (~> 1.3)
rest-client rest-client
simplecov (>= 0.7) simplecov (>= 0.7)
term-ansicolor term-ansicolor
thor thor
crack (0.4.2) crack (0.4.2)
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
cucumber (1.3.15) cucumber (1.3.15)
builder (>= 2.1.2) builder (>= 2.1.2)
diff-lcs (>= 1.1.3) diff-lcs (>= 1.1.3)
gherkin (~> 2.12) gherkin (~> 2.12)
multi_json (>= 1.7.5, < 2.0) multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.1) multi_test (>= 0.1.1)
cucumber-rails (1.4.1) cucumber-rails (1.4.1)
capybara (>= 1.1.2, < 3) capybara (>= 1.1.2, < 3)
cucumber (>= 1.3.8, < 2) cucumber (>= 1.3.8, < 2)
mime-types (~> 1.16) mime-types (~> 1.16)
nokogiri (~> 1.5) nokogiri (~> 1.5)
rails (>= 3, < 5) rails (>= 3, < 5)
database_cleaner (1.3.0) database_cleaner (1.3.0)
debug_inspector (0.0.2) debug_inspector (0.0.2)
diff-lcs (1.2.5) diff-lcs (1.2.5)
docile (1.1.5) docile (1.1.5)
erubis (2.7.0) erubis (2.7.0)
execjs (2.2.1) execjs (2.2.1)
factory_girl (4.4.0) factory_girl (4.4.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
factory_girl_rails (4.4.1) factory_girl_rails (4.4.1)
factory_girl (~> 4.4.0) factory_girl (~> 4.4.0)
railties (>= 3.0.0) railties (>= 3.0.0)
faraday (0.9.0) faraday (0.9.0)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
ffi (1.9.3) ffi (1.9.3)
ffi (1.9.3-x86-mingw32) ffi (1.9.3-x86-mingw32)
font-awesome-rails (4.1.0.0) font-awesome-rails (4.1.0.0)
railties (>= 3.2, < 5.0) railties (>= 3.2, < 5.0)
forgery (0.6.0) forgery (0.6.0)
formatador (0.2.5) formatador (0.2.5)
foundation-rails (5.3.1.0) foundation-rails (5.3.1.0)
railties (>= 3.1.0) railties (>= 3.1.0)
sass (>= 3.2.0) sass (>= 3.2.0)
fssm (0.2.10) fssm (0.2.10)
geocoder (1.2.3) geocoder (1.2.3)
gherkin (2.12.2) gherkin (2.12.2)
multi_json (~> 1.3) multi_json (~> 1.3)
gherkin (2.12.2-x86-mingw32) gherkin (2.12.2-x86-mingw32)
multi_json (~> 1.3) multi_json (~> 1.3)
guard (2.6.1) guard (2.6.1)
formatador (>= 0.2.4) formatador (>= 0.2.4)
listen (~> 2.7) listen (~> 2.7)
lumberjack (~> 1.0) lumberjack (~> 1.0)
pry (>= 0.9.12) pry (>= 0.9.12)
thor (>= 0.18.1) thor (>= 0.18.1)
guard-rspec (4.2.10) guard-rspec (4.2.10)
guard (~> 2.1) guard (~> 2.1)
rspec (>= 2.14, < 4.0) rspec (>= 2.14, < 4.0)
haml (4.0.5) haml (4.0.5)
tilt tilt
haml-rails (0.5.1) haml-rails (0.5.1)
actionpack (~> 4.0.0) actionpack (~> 4.0.0)
activesupport (~> 4.0.0) activesupport (~> 4.0.0)
haml (>= 3.1, < 5.0) haml (>= 3.1, < 5.0)
railties (~> 4.0.0) railties (~> 4.0.0)
highline (1.6.21) highline (1.6.21)
hike (1.2.3) hike (1.2.3)
httpauth (0.2.1) httpauth (0.2.1)
i18n (0.6.11) i18n (0.6.11)
image_optimizer (1.2.1) image_optimizer (1.2.1)
jquery-rails (3.1.1) jquery-rails (3.1.1)
railties (>= 3.0, < 5.0) railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.0) jquery-ui-rails (5.0.0)
railties (>= 3.2.16) railties (>= 3.2.16)
json (1.8.1) json (1.8.1)
jwt (0.1.13) jwt (0.1.13)
multi_json (>= 1.5) multi_json (>= 1.5)
kgio (2.9.2) launchy (2.4.2)
launchy (2.4.2) addressable (~> 2.3)
addressable (~> 2.3) listen (2.7.9)
listen (2.7.9) celluloid (>= 0.15.2)
celluloid (>= 0.15.2) rb-fsevent (>= 0.9.3)
rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9)
rb-inotify (>= 0.9) lumberjack (1.0.9)
lumberjack (1.0.9) mail (2.5.4)
mail (2.5.4) mime-types (~> 1.16)
mime-types (~> 1.16) treetop (~> 1.4.8)
treetop (~> 1.4.8) meta_request (0.3.3)
meta_request (0.3.3) callsite (~> 0.0, >= 0.0.11)
callsite (~> 0.0, >= 0.0.11) rack-contrib (~> 1.1)
rack-contrib (~> 1.1) railties (>= 3.0.0, < 5.0.0)
railties (>= 3.0.0, < 5.0.0) method_source (0.8.2)
method_source (0.8.2) mime-types (1.25.1)
mime-types (1.25.1) mini_magick (3.7.0)
mini_magick (3.7.0) subexec (~> 0.2.1)
subexec (~> 0.2.1) mini_portile (0.6.0)
mini_portile (0.6.0) minitest (4.7.5)
minitest (4.7.5) multi_json (1.10.1)
multi_json (1.10.1) multi_test (0.1.1)
multi_test (0.1.1) multipart-post (2.0.0)
multipart-post (2.0.0) nested_form (0.3.2)
nested_form (0.3.2) net-scp (1.2.1)
net-scp (1.2.1) net-ssh (>= 2.6.5)
net-ssh (>= 2.6.5) net-sftp (2.1.2)
net-sftp (2.1.2) net-ssh (>= 2.6.5)
net-ssh (>= 2.6.5) net-ssh (2.9.1)
net-ssh (2.9.1) net-ssh-gateway (1.2.0)
net-ssh-gateway (1.2.0) net-ssh (>= 2.6.5)
net-ssh (>= 2.6.5) netrc (0.7.7)
netrc (0.7.7) nokogiri (1.6.2.1)
nokogiri (1.6.2.1) mini_portile (= 0.6.0)
mini_portile (= 0.6.0) nokogiri (1.6.2.1-x86-mingw32)
nokogiri (1.6.2.1-x86-mingw32) mini_portile (= 0.6.0)
mini_portile (= 0.6.0) oauth (0.4.7)
oauth (0.4.7) oauth2 (0.8.1)
oauth2 (0.8.1) faraday (~> 0.8)
faraday (~> 0.8) httpauth (~> 0.1)
httpauth (~> 0.1) jwt (~> 0.1.4)
jwt (~> 0.1.4) multi_json (~> 1.0)
multi_json (~> 1.0) rack (~> 1.2)
rack (~> 1.2) paper_trail (3.0.5)
paper_trail (3.0.5) activerecord (>= 3.0, < 5.0)
activerecord (>= 3.0, < 5.0) activesupport (>= 3.0, < 5.0)
activesupport (>= 3.0, < 5.0) paypal-express (0.5.5)
paypal-express (0.5.5) activesupport (>= 2.3)
activesupport (>= 2.3) attr_required (>= 0.0.5)
attr_required (>= 0.0.5) restclient_with_cert
restclient_with_cert pg (0.17.1)
pg (0.17.1) pg (0.17.1-x86-mingw32)
pg (0.17.1-x86-mingw32) poltergeist (1.5.1)
poltergeist (1.5.1) capybara (~> 2.1)
capybara (~> 2.1) cliver (~> 0.3.1)
cliver (~> 0.3.1) multi_json (~> 1.0)
multi_json (~> 1.0) websocket-driver (>= 0.2.0)
websocket-driver (>= 0.2.0) polyglot (0.3.5)
polyglot (0.3.5) pry (0.10.0)
pry (0.10.0) coderay (~> 1.1.0)
coderay (~> 1.1.0) method_source (~> 0.8.1)
method_source (~> 0.8.1) slop (~> 3.4)
slop (~> 3.4) pry (0.10.0-x86-mingw32)
pry (0.10.0-x86-mingw32) coderay (~> 1.1.0)
coderay (~> 1.1.0) method_source (~> 0.8.1)
method_source (~> 0.8.1) slop (~> 3.4)
slop (~> 3.4) win32console (~> 1.3)
win32console (~> 1.3) rack (1.5.2)
rack (1.5.2) rack-contrib (1.1.0)
rack-contrib (1.1.0) rack (>= 0.9.1)
rack (>= 0.9.1) rack-test (0.6.2)
rack-test (0.6.2) rack (>= 1.0)
rack (>= 1.0) rails (4.0.0)
rails (4.0.0) actionmailer (= 4.0.0)
actionmailer (= 4.0.0) actionpack (= 4.0.0)
actionpack (= 4.0.0) activerecord (= 4.0.0)
activerecord (= 4.0.0) activesupport (= 4.0.0)
activesupport (= 4.0.0) bundler (>= 1.3.0, < 2.0)
bundler (>= 1.3.0, < 2.0) railties (= 4.0.0)
railties (= 4.0.0) sprockets-rails (~> 2.0.0)
sprockets-rails (~> 2.0.0) rails-assets-cdn (0.1.0)
rails-assets-cdn (0.1.0) rails
rails rails_12factor (0.0.2)
rails_12factor (0.0.2) rails_serve_static_assets
rails_serve_static_assets rails_stdout_logging
rails_stdout_logging rails_serve_static_assets (0.0.2)
rails_serve_static_assets (0.0.2) rails_stdout_logging (0.0.3)
rails_stdout_logging (0.0.3) railties (4.0.0)
railties (4.0.0) actionpack (= 4.0.0)
actionpack (= 4.0.0) activesupport (= 4.0.0)
activesupport (= 4.0.0) rake (>= 0.8.7)
rake (>= 0.8.7) thor (>= 0.18.1, < 2.0)
thor (>= 0.18.1, < 2.0) rake (10.3.2)
raindrops (0.13.0) rb-fsevent (0.9.4)
rake (10.3.2) rb-inotify (0.9.5)
rb-fsevent (0.9.4) ffi (>= 0.5.0)
rb-inotify (0.9.5) rest-client (1.7.2)
ffi (>= 0.5.0) mime-types (>= 1.16, < 3.0)
rest-client (1.7.2) netrc (~> 0.7)
mime-types (>= 1.16, < 3.0) rest-client (1.7.2-x86-mingw32)
netrc (~> 0.7) ffi (~> 1.9)
rest-client (1.7.2-x86-mingw32) mime-types (>= 1.16, < 3.0)
ffi (~> 1.9) netrc (~> 0.7)
mime-types (>= 1.16, < 3.0) restclient_with_cert (0.0.8)
netrc (~> 0.7) rest-client (>= 1.6)
restclient_with_cert (0.0.8) rspec (3.0.0)
rest-client (>= 1.6) rspec-core (~> 3.0.0)
rspec (3.0.0) rspec-expectations (~> 3.0.0)
rspec-core (~> 3.0.0) rspec-mocks (~> 3.0.0)
rspec-expectations (~> 3.0.0) rspec-core (3.0.2)
rspec-mocks (~> 3.0.0) rspec-support (~> 3.0.0)
rspec-core (3.0.2) rspec-expectations (3.0.2)
rspec-support (~> 3.0.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-expectations (3.0.2) rspec-support (~> 3.0.0)
diff-lcs (>= 1.2.0, < 2.0) rspec-mocks (3.0.2)
rspec-support (~> 3.0.0) rspec-support (~> 3.0.0)
rspec-mocks (3.0.2) rspec-rails (3.0.1)
rspec-support (~> 3.0.0) actionpack (>= 3.0)
rspec-rails (3.0.1) activesupport (>= 3.0)
actionpack (>= 3.0) railties (>= 3.0)
activesupport (>= 3.0) rspec-core (~> 3.0.0)
railties (>= 3.0) rspec-expectations (~> 3.0.0)
rspec-core (~> 3.0.0) rspec-mocks (~> 3.0.0)
rspec-expectations (~> 3.0.0) rspec-support (~> 3.0.0)
rspec-mocks (~> 3.0.0) rspec-support (3.0.2)
rspec-support (~> 3.0.0) rubyzip (1.1.6)
rspec-support (3.0.2) rvm-capistrano (1.5.3)
rubyzip (1.1.6) capistrano (~> 2.15.4)
rvm-capistrano (1.5.3) safe_yaml (1.0.3)
capistrano (~> 2.15.4) sass (3.2.19)
safe_yaml (1.0.3) sass-rails (4.0.3)
sass (3.2.19) railties (>= 4.0.0, < 5.0)
sass-rails (4.0.3) sass (~> 3.2.0)
railties (>= 4.0.0, < 5.0) sprockets (~> 2.8, <= 2.11.0)
sass (~> 3.2.0) sprockets-rails (~> 2.0)
sprockets (~> 2.8, <= 2.11.0) selenium-webdriver (2.42.0)
sprockets-rails (~> 2.0) childprocess (>= 0.5.0)
selenium-webdriver (2.42.0) multi_json (~> 1.0)
childprocess (>= 0.5.0) rubyzip (~> 1.0)
multi_json (~> 1.0) websocket (~> 1.0.4)
rubyzip (~> 1.0) simplecov (0.9.0)
websocket (~> 1.0.4) docile (~> 1.1.0)
simplecov (0.9.0) multi_json
docile (~> 1.1.0) simplecov-html (~> 0.8.0)
multi_json simplecov-html (0.8.0)
simplecov-html (~> 0.8.0) sitemap_generator (5.0.4)
simplecov-html (0.8.0) builder
sitemap_generator (5.0.4) slop (3.6.0)
builder sorcery (0.8.6)
slop (3.6.0) bcrypt (~> 3.1)
sorcery (0.8.6) oauth (~> 0.4, >= 0.4.4)
bcrypt (~> 3.1) oauth2 (>= 0.8.0, < 1.0.0)
oauth (~> 0.4, >= 0.4.4) sprockets (2.11.0)
oauth2 (>= 0.8.0, < 1.0.0) hike (~> 1.2)
sprockets (2.11.0) multi_json (~> 1.0)
hike (~> 1.2) rack (~> 1.0)
multi_json (~> 1.0) tilt (~> 1.1, != 1.3.0)
rack (~> 1.0) sprockets-rails (2.0.1)
tilt (~> 1.1, != 1.3.0) actionpack (>= 3.0)
sprockets-rails (2.0.1) activesupport (>= 3.0)
actionpack (>= 3.0) sprockets (~> 2.8)
activesupport (>= 3.0) subexec (0.2.3)
sprockets (~> 2.8) term-ansicolor (1.3.0)
subexec (0.2.3) tins (~> 1.0)
term-ansicolor (1.3.0) thor (0.19.1)
tins (~> 1.0) thread_safe (0.3.4)
thor (0.19.1) tilt (1.4.1)
thread_safe (0.3.4) timers (1.1.0)
tilt (1.4.1) tins (1.3.0)
timers (1.1.0) treetop (1.4.15)
tins (1.3.0) polyglot
treetop (1.4.15) polyglot (>= 0.3.1)
polyglot tzinfo (0.3.40)
polyglot (>= 0.3.1) uglifier (2.5.3)
tzinfo (0.3.40) execjs (>= 0.3.0)
uglifier (2.5.3) json (>= 1.8.0)
execjs (>= 0.3.0) unicode_utils (1.4.0)
json (>= 1.8.0) wdm (0.1.0)
unicode_utils (1.4.0) webmock (1.18.0)
unicorn (4.8.3) addressable (>= 2.3.6)
kgio (~> 2.6) crack (>= 0.3.2)
rack websocket (1.0.7)
raindrops (~> 0.7) websocket-driver (0.3.4)
wdm (0.1.0) win32console (1.3.2-x86-mingw32)
webmock (1.18.0) wysiwyg-rails (1.1.6)
addressable (>= 2.3.6) font-awesome-rails (= 4.1.0.0)
crack (>= 0.3.2) railties (>= 3.2, < 5.0)
websocket (1.0.7) xpath (2.0.0)
websocket-driver (0.3.4) nokogiri (~> 1.3)
win32console (1.3.2-x86-mingw32)
wysiwyg-rails (1.1.6) PLATFORMS
font-awesome-rails (= 4.1.0.0) ruby
railties (>= 3.2, < 5.0) x86-mingw32
xpath (2.0.0)
nokogiri (~> 1.3) DEPENDENCIES
activerecord-session_store
PLATFORMS acts_as_list
ruby awesome_print
x86-mingw32 better_errors
binding_of_caller
DEPENDENCIES capistrano
activerecord-session_store capybara
acts_as_list carmen-rails
awesome_print carrierwave
better_errors carrierwave-imageoptimizer
binding_of_caller coffee-rails (~> 4.0.0)
capistrano compass-rails (~> 1.1.3)
capybara coveralls
carmen-rails cucumber-rails
carrierwave database_cleaner
carrierwave-imageoptimizer factory_girl_rails
coffee-rails (~> 4.0.0) font-awesome-rails
compass-rails (~> 1.1.3) forgery
coveralls foundation-rails
cucumber-rails geocoder
database_cleaner guard-rspec
factory_girl_rails haml
font-awesome-rails haml-rails
forgery i18n-active_record!
foundation-rails jquery-rails
geocoder jquery-ui-rails
guard-rspec launchy
haml meta_request
haml-rails mini_magick
i18n-active_record! nested_form
jquery-rails oauth2 (~> 0.8.0)
jquery-ui-rails paper_trail (~> 3.0.5)
launchy paypal-express
meta_request pg
mini_magick poltergeist
nested_form rails (= 4.0.0)
oauth2 (~> 0.8.0) rails-assets-cdn
paper_trail (~> 3.0.5) rails-footnotes!
paypal-express rails_12factor
pg rspec
poltergeist rspec-rails
rails (= 4.0.0) rvm-capistrano
rails-assets-cdn sass-rails (~> 4.0.0)
rails-footnotes! selenium-webdriver
rails_12factor simplecov
rspec sitemap_generator
rspec-rails sorcery (>= 0.8.1)
rvm-capistrano uglifier (>= 1.3.0)
sass-rails (~> 4.0.0) wdm (>= 0.1.0)
selenium-webdriver webmock
simplecov wysiwyg-rails
sitemap_generator
sorcery (>= 0.8.1)
uglifier (>= 1.3.0)
unicorn
wdm (>= 0.1.0)
webmock
wysiwyg-rails

74
app/assets/javascripts/editor.js.coffee

@ -1,37 +1,37 @@
#= require froala_editor.min.js #= require froala_editor.min.js
$ -> $ ->
$('[data-editable]').editable({inlineMode: true, blockTags: ["n", "p", "h2", "blockquote", "pre"], buttons: ["formatBlock", "bold", "italic", "underline", "insertOrderedList", "insertUnorderedList", "sep", "createLink", "insertImage", "insertVideo", "html", "undo", "redo"]}) $('[data-editable]').editable({inlineMode: true, blockTags: ["n", "p", "h2", "blockquote", "pre"], buttons: ["formatBlock", "bold", "italic", "underline", "insertOrderedList", "insertUnorderedList", "sep", "createLink", "insertImage", "insertVideo", "html", "undo", "redo"]})
$('[data-editor]').editable({inlineMode: false, blockTags: ["n", "p", "h2", "blockquote", "pre"], buttons: ["formatBlock", "bold", "italic", "underline", "insertOrderedList", "insertUnorderedList", "sep", "createLink", "html", "undo", "redo"]}) $('[data-editor]').editable({inlineMode: false, blockTags: ["n", "p", "h2", "blockquote", "pre"], buttons: ["formatBlock", "bold", "italic", "underline", "insertOrderedList", "insertUnorderedList", "sep", "createLink", "html", "undo", "redo"]})
$('.field.country-select-field select').change () -> $('.field.country-select-field select').change () ->
$country = $(this) $country = $(this)
country = $country.val() country = $country.val()
$territory = $('.field.subregion-select-field select') $territory = $('.field.subregion-select-field select')
if $territory.data().country == country if $territory.data().country == country
$territory.removeClass('can cant').addClass('can') $territory.removeClass('can cant').addClass('can')
return return
$.post '/location/territories', {country: country}, $.post '/location/territories', {country: country},
(json) -> (json) ->
$territory.html('') $territory.html('')
if json && Object.keys(json).length if json && Object.keys(json).length
$.each json, (code, name) -> $.each json, (code, name) ->
$territory.append($('<option>').text(name).attr('value', code)) $territory.append($('<option>').text(name).attr('value', code))
return return
$territory.removeClass('can cant').addClass('can') $territory.removeClass('can cant').addClass('can')
$territory.data().country = country $territory.data().country = country
else else
$territory.removeClass('can cant').addClass('cant') $territory.removeClass('can cant').addClass('cant')
return return
, 'json' , 'json'
$('img + input[type="file"]').change () -> $('img + input[type="file"]').change () ->
readURL(this); readURL(this);
return return
readURL = (input) -> readURL = (input) ->
reader = null reader = null
if input.files && input.files[0] if input.files && input.files[0]
reader = new FileReader() reader = new FileReader()
reader.readAsDataURL input.files[0] reader.readAsDataURL input.files[0]
reader.onload = (e) -> reader.onload = (e) ->
$(input).prev().attr('src', e.target.result) $(input).prev().attr('src', e.target.result)
return return

1660
app/controllers/conferences_controller.rb

File diff suppressed because it is too large

1166
app/helpers/application_helper.rb

File diff suppressed because it is too large

3735
config/locales/translation-info.yml

File diff suppressed because it is too large

9
config/paypal.yml

@ -0,0 +1,9 @@
development:
username: goodgodwin-facilitator_api1.hotmail.com
password: 1364499062
signature: A8ydvWJ4VGIEPgYhKlCiqbJ7KrGvATclp5xDn-IKlmSUFXGwcA62ZT82
test:
username: goodgodwin-facilitator_api1.hotmail.com
password: 1364499062
signature: A8ydvWJ4VGIEPgYhKlCiqbJ7KrGvATclp5xDn-IKlmSUFXGwcA62ZT82

7
config/registrations_access.yml

@ -0,0 +1,7 @@
development:
username: admin
password: password
test:
username: admin
password: password

1063
features/registration.feature

File diff suppressed because it is too large

478
features/step_definitions/interface_steps.rb

@ -1,238 +1,240 @@
Given(/^I am on the (.+) page$/) do |page_name| Given(/^I am on the (.+) page$/) do |page_name|
visit path_to(page_name.to_sym) visit path_to(page_name.to_sym)
end end
Given(/^I am on the (.+) site$/) do |language| Given(/^I am on the (.+) site$/) do |language|
ApplicationController::set_host (get_language_code(language) + '.bikebike.org') ApplicationController::set_host (get_language_code(language) + '.bikebike.org')
end end
Given(/^I am in (.+)$/) do |location| Given(/^I am in (.+)$/) do |location|
ApplicationController::set_location (location) ApplicationController::set_location (location)
end end
When(/^I go to the (.+) page$/) do |page_name| When(/^I go to the (.+) page$/) do |page_name|
visit path_to(page_name.to_sym) visit path_to(page_name.to_sym)
end end
When(/^(I )?(finish|cancel) ((with )?paypal)$/) do |a, action, b, c| When(/^(I )?(finish|cancel) ((with )?(paypal|the payment))$/) do |a, action, b, c, d|
@last_registration.payment_info = {:payer_id => '1234', :token => '5678', :amount => @last_payment_amount}.to_yaml if action != 'cancel'
@last_registration.save! @last_registration.payment_info = {:payer_id => '1234', :token => '5678', :amount => @last_payment_amount}.to_yaml
visit path_to((action == 'finish' ? 'confirm' : action) + ' paypal') @last_registration.save!
end end
visit path_to((action == 'finish' ? 'confirm' : action) + ' paypal')
Then(/^(I )?pay \$?([\d\.]+)$/) do | a, amount | end
button = nil
begin; button = locate("auto pay #{amount.to_f.to_i}"); rescue; end Then(/^(I )?pay \$?([\d\.]+)$/) do | a, amount |
if button button = nil
click_link_or_button(button) begin; button = locate("auto pay #{amount.to_f.to_i}"); rescue; end
else if button
fill_in(locate('payment amount'), :with => amount) click_link_or_button(button)
click_link_or_button(locate('custom amount')) else
end fill_in(locate('payment amount'), :with => amount)
@last_payment_amount = amount click_link_or_button(locate('custom amount'))
end end
@last_payment_amount = amount
Then(/^(I )?(don't )?have enough funds$/) do | a, status | end
if status.blank?
info = YAML.load(@last_registration.payment_info) Then(/^(I )?(don't )?have enough funds$/) do | a, status |
info[:status] = 'Completed' if status.blank?
@last_registration.payment_info = info.to_yaml info = YAML.load(@last_registration.payment_info)
@last_registration.save! info[:status] = 'Completed'
end @last_registration.payment_info = info.to_yaml
end @last_registration.save!
end
Given(/^There is an upcoming conference( in .+)?$/) do |location| end
@last_conference = FactoryGirl.create(:upcoming_conference)
if location Given(/^There is an upcoming conference( in .+)?$/) do |location|
@org = create_org(nil, location) @last_conference = FactoryGirl.create(:upcoming_conference)
@last_conference.organizations << @org if location
@last_conference.save! @org = create_org(nil, location)
end @last_conference.organizations << @org
end @last_conference.save!
end
Given(/^an organization( named .+)? exists( in .+)?$/) do |name, location| end
if location =~ /every country/i
Carmen::World.instance.subregions.each { |country| Given(/^an organization( named .+)? exists( in .+)?$/) do |name, location|
#puts "#{country.code}" if location =~ /every country/i
Carmen::World.instance.subregions.each { |country|
if country.subregions? #puts "#{country.code}"
country.subregions.each { |region|
org = Organization.new(name: rand(36**16).to_s(36), slug: rand(36**16).to_s(36))#create_org#(Forgery::LoremIpsum.sentence) if country.subregions?
org.locations << Location.new(city: 'City', country: country.code, territory: region.code) country.subregions.each { |region|
org.save! org = Organization.new(name: rand(36**16).to_s(36), slug: rand(36**16).to_s(36))#create_org#(Forgery::LoremIpsum.sentence)
} org.locations << Location.new(city: 'City', country: country.code, territory: region.code)
else org.save!
org = Organization.new(name: rand(36**16).to_s(36), slug: rand(36**16).to_s(36))#create_org#(Forgery::LoremIpsum.sentence) }
org.locations << Location.new(city: 'City', country: country.code) else
org.save! org = Organization.new(name: rand(36**16).to_s(36), slug: rand(36**16).to_s(36))#create_org#(Forgery::LoremIpsum.sentence)
end org.locations << Location.new(city: 'City', country: country.code)
} org.save!
else end
create_org(name ? name.gsub(/^\s*named\s+(.*?)\s*$/, '\1') : nil, location ? location.gsub(/^\s*in\s+(.*?)\s*$/, '\1') : nil) }
end else
end create_org(name ? name.gsub(/^\s*named\s+(.*?)\s*$/, '\1') : nil, location ? location.gsub(/^\s*in\s+(.*?)\s*$/, '\1') : nil)
end
Given(/^Registration is (open|closed)$/) do |status| end
@last_conference.registration_open = (status == 'open')
@last_conference.save! Given(/^Registration is (open|closed)$/) do |status|
end @last_conference.registration_open = (status == 'open')
@last_conference.save!
Then(/^I (should )?see (.+)$/) do | a, item | end
if /(the )?Bike!Bike! logo$/ =~ item
expect(page).to have_selector('svg.logo') Then(/^I (should )?see (.+)$/) do | a, item |
elsif /(the|a)?\s?(.+) menu item$/ =~ item if /(the )?Bike!Bike! logo$/ =~ item
within('#main-nav') { expect(page).to have_link Regexp.last_match(2) } expect(page).to have_selector('svg.logo')
elsif /(the|a)?\s?(.+) image$/ =~ item elsif /(the|a)?\s?(.+) menu item$/ =~ item
expect(page).to have_selector('#'+Regexp.last_match(2)+' img') within('#main-nav') { expect(page).to have_link Regexp.last_match(2) }
elsif /(the|a)?\s?(.+) link$/ =~ item elsif /(the|a)?\s?(.+) image$/ =~ item
expect(page).to have_link Regexp.last_match(2) expect(page).to have_selector('#'+Regexp.last_match(2)+' img')
else elsif /(the|a)?\s?(.+) link$/ =~ item
expect(page).to have_text item expect(page).to have_link Regexp.last_match(2)
end else
end expect(page).to have_text item
end
end
## ======= Forms ======= ##
Then(/^(I )?click on (.+?)( button| link| which is hidden)?$/) do | a, item, type | ## ======= Forms ======= ##
item = item.gsub(/^\s*(a|the)\s*(.*)$/, '\2')
if type && type.strip == 'button' Then(/^(I )?click on (.+?)( button| link| which is hidden)?$/) do | a, item, type |
click_button(item) item = item.gsub(/^\s*(a|the)\s*(.*)$/, '\2')
elsif type && type.strip == 'link' if type && type.strip == 'button'
click_link(item) click_button(item)
elsif type && type =~ /hidden/ elsif type && type.strip == 'link'
find('[id$="' + item.gsub(/\s+/, '_') + '"]', :visible => false).click click_link(item)
else elsif type && type =~ /hidden/
page.find_link(item).trigger('click') find('[id$="' + item.gsub(/\s+/, '_') + '"]', :visible => false).click
end else
end page.find_link(item).trigger('click')
end
Then(/^(I )?press (.+)$/) do | a, item | end
click_link_or_button(locate(item))
end Then(/^(I )?press (.+)$/) do | a, item |
click_link_or_button(locate(item))
Then(/^I (un)?check (.+)$/) do | state, item | end
if state == 'un'
uncheck(locate(item)) Then(/^I (un)?check (.+)$/) do | state, item |
else if state == 'un'
check(locate(item)) uncheck(locate(item))
end else
end check(locate(item))
end
Then(/^I fill in (.+?) with (.+)$/) do | field, value | end
field = field.gsub(/^\s*(my|the)\s*(.+)$/, '\2')
fill_in(locate(field), :with => value) Then(/^I fill in (.+?) with (.+)$/) do | field, value |
field = field.gsub(/^\s*(my|the)\s*(.+)$/, '\2')
if /email/ =~ field && !(/organization/ =~ field) fill_in(locate(field), :with => value)
@last_email_entered = value
end if /email/ =~ field && !(/organization/ =~ field)
end @last_email_entered = value
end
Then(/^(my )?(.+)? should (not )?be set to (.+)$/) do | a, field, should, value | end
field = field.gsub(/^\s*(my|the)\s*(.+)$/, '\2')
page.find('[id$="' + field.gsub(/\s+/, '_') + '"]').value.send(should.nil? ? 'should' : 'should_not', eq(value)) Then(/^(my )?(.+)? should (not )?be set to (.+)$/) do | a, field, should, value |
end field = field.gsub(/^\s*(my|the)\s*(.+)$/, '\2')
page.find('[id$="' + field.gsub(/\s+/, '_') + '"]').value.send(should.nil? ? 'should' : 'should_not', eq(value))
Then(/^(my )?(.+)? should (not )?be checked$/) do | a, field, should | end
field = field.gsub(/^\s*(my|the)\s*(.+)$/, '\2')
page.find('[id$="' + field.gsub(/\s+/, '_') + '"]').send(should.nil? ? 'should' : 'should_not', be_checked) Then(/^(my )?(.+)? should (not )?be checked$/) do | a, field, should |
end field = field.gsub(/^\s*(my|the)\s*(.+)$/, '\2')
page.find('[id$="' + field.gsub(/\s+/, '_') + '"]').send(should.nil? ? 'should' : 'should_not', be_checked)
Then(/^I set (.+?) to (.+)$/) do | field, value | end
field = field.gsub(/^\s*(my|the)\s*(.+)$/, '\2')
page.find('[id$="' + field.gsub(/\s+/, '_') + '"]', :visible => false).set value Then(/^I set (.+?) to (.+)$/) do | field, value |
end field = field.gsub(/^\s*(my|the)\s*(.+)$/, '\2')
page.find('[id$="' + field.gsub(/\s+/, '_') + '"]', :visible => false).set value
Then(/^(I )wait for (.+?) to appear$/) do | a, field | end
count = 0
element = nil Then(/^(I )wait for (.+?) to appear$/) do | a, field |
while element.nil? && count < 120 count = 0
begin element = page.find('[id$="' + field.gsub(/\s+/, '_') + '"]'); rescue; end element = nil
begin element ||= page.find('[id$="' + field.gsub(/\s+/, '_') + '"]', :visible => false); rescue; end while element.nil? && count < 120
sleep(1) begin element = page.find('[id$="' + field.gsub(/\s+/, '_') + '"]'); rescue; end
count += 1 begin element ||= page.find('[id$="' + field.gsub(/\s+/, '_') + '"]', :visible => false); rescue; end
end sleep(1)
end count += 1
end
Then(/^show the page$/) do end
print page.html
save_and_open_page Then(/^show the page$/) do
end print page.html
save_and_open_page
Then(/^I select (.+?) from (.+)$/) do | value, field | end
select(value, :from => locate(field))
end Then(/^I select (.+?) from (.+)$/) do | value, field |
select(value, :from => locate(field))
## ======= Emails ======= ## end
Then(/^I should not get an email$/) do ## ======= Emails ======= ##
ActionMailer::Base.deliveries.size.should eq 0
end Then(/^I should not get an email$/) do
ActionMailer::Base.deliveries.size.should eq 0
Then (/^I should get an? (.+) email$/) do |subject| end
@last_email = ActionMailer::Base.deliveries.last
if @last_email_entered Then (/^I should get an? (.+) email$/) do |subject|
@last_email.to.should include @last_email_entered @last_email = ActionMailer::Base.deliveries.last
end if @last_email_entered
@last_email.subject.should include(subject) @last_email.to.should include @last_email_entered
end end
@last_email.subject.should include(subject)
Then (/^the email should contain (.+)$/) do |value| end
@last_email.parts.first.body.raw_source.should include(value)
@last_email.parts.last.body.raw_source.should include(value) Then (/^the email should contain (.+)$/) do |value|
end @last_email.parts.first.body.raw_source.should include(value)
@last_email.parts.last.body.raw_source.should include(value)
Then (/^in the email I should see (.+)$/) do |value| end
if /(an?|the|my) (.+) link/ =~ value
test = path_to Regexp.last_match(2) Then (/^in the email I should see (.+)$/) do |value|
@last_email.parts.first.body.raw_source.should include(test) if /(an?|the|my) (.+) link/ =~ value
@last_email.parts.last.body.raw_source.should include(test) test = path_to Regexp.last_match(2)
else @last_email.parts.first.body.raw_source.should include(test)
@last_email.parts.first.body.raw_source.should include(value) @last_email.parts.last.body.raw_source.should include(test)
@last_email.parts.last.body.raw_source.should include(value) else
end @last_email.parts.first.body.raw_source.should include(value)
end @last_email.parts.last.body.raw_source.should include(value)
end
Then (/^I should (not )?be registered for the conference$/) do |state| end
@last_registration = ConferenceRegistration.find_by(:email => @last_email_entered)
if state && state.strip == 'not' Then (/^I should (not )?be registered for the conference$/) do |state|
@last_registration.should be_nil @last_registration = ConferenceRegistration.find_by(:email => @last_email_entered)
else if state && state.strip == 'not'
@last_registration.should_not be_nil @last_registration.should be_nil
end else
end @last_registration.should_not be_nil
end
Then (/^my registration (should( not)? be|is( not)?) (confirmed|completed?|paid)$/) do |state, x, y, field| end
ConferenceRegistration.find_by!(:email => @last_email_entered).
send(field == 'confirmed' ? 'is_confirmed' : (field == 'paid' ? 'registration_fees_paid' : field)). Then (/^my registration (should( not)? be|is( not)?) (confirmed|completed?|paid)$/) do |state, x, y, field|
send(state =~ / not/ ? 'should_not' : 'should', be) ConferenceRegistration.find_by!(:email => @last_email_entered).
end send(field == 'confirmed' ? 'is_confirmed' : (field == 'paid' ? 'registration_fees_paid' : field)).
send(state =~ / not/ ? 'should_not' : 'should', be)
Then (/^I am( not)? a user$/) do |state| end
User.find_by(:email => @last_email_entered).
send(state =~ / not/ ? 'should_not' : 'should', be) Then (/^I am( not)? a user$/) do |state|
end User.find_by(:email => @last_email_entered).
send(state =~ / not/ ? 'should_not' : 'should', be)
Then (/^I am( not)? a member of (.+)$/) do |state, org_name| end
user = nil
should_be = !(state =~ / not/) Then (/^I am( not)? a member of (.+)$/) do |state, org_name|
org = Organization.find_by(:name => org_name) user = nil
if should_be should_be = !(state =~ / not/)
org.should be org = Organization.find_by(:name => org_name)
org.users.should be if should_be
elsif org.nil? || org.users.nil? org.should be
return org.users.should be
end elsif org.nil? || org.users.nil?
org.users.each { |u| return
if u.email == @last_email_entered end
user = u org.users.each { |u|
end if u.email == @last_email_entered
} user = u
user.send(should_be ? 'should' : 'should_not', be) end
end }
user.send(should_be ? 'should' : 'should_not', be)
Then (/^My (.+) should(not )? be (.+)$/) do |field, state, value| end
User.find_by(:email => @last_email_entered).
send(field.gsub(/\s/, '_')). Then (/^My (.+) should(not )? be (.+)$/) do |field, state, value|
send(state =~ / not/ ? 'should_not' : 'should', eq(value)) User.find_by(:email => @last_email_entered).
end send(field.gsub(/\s/, '_')).
send(state =~ / not/ ? 'should_not' : 'should', eq(value))
end

74
features/support/paths.rb

@ -1,36 +1,38 @@
module NavigationHelpers module NavigationHelpers
def path_to(page_name) def path_to(page_name)
append_root = false append_root = false
case page_name case page_name
when /^landing$/i when /^landing$/i
path = :root path = :root
when /^confirmation$/i when /^confirmation$/i
path = "/conferences/bikebike/#{@last_conference.slug}/register/confirm/#{@last_registration.confirmation_token}" path = "/conferences/bikebike/#{@last_conference.slug}/register/confirm/#{@last_registration.confirmation_token}"
when /^pay registration$/i when /^registration$/i
path = "/conferences/bikebike/#{@last_conference.slug}/register/pay-registration/#{@last_registration.confirmation_token}" path = "/conferences/bikebike/#{@last_conference.slug}/register/"
when /^confirm paypal$/i when /^pay registration$/i
path = "/conferences/bikebike/#{@last_conference.slug}/register/paypal-confirm/#{@last_registration.payment_confirmation_token}" path = "/conferences/bikebike/#{@last_conference.slug}/register/pay-registration/#{@last_registration.confirmation_token}"
when /^cancel paypal$/i when /^confirm paypal$/i
path = "/conferences/bikebike/#{@last_conference.slug}/register/paypal-cancel/#{@last_registration.confirmation_token}" path = "/conferences/bikebike/#{@last_conference.slug}/register/paypal-confirm/#{@last_registration.payment_confirmation_token}"
when /^translation list$/i when /^cancel paypal$/i
path = '/translations/' path = "/conferences/bikebike/#{@last_conference.slug}/register/paypal-cancel/#{@last_registration.confirmation_token}"
when /^(.+) translations?$/i when /^translation list$/i
path = '/translations/' + get_language_code(Regexp.last_match(1)) path = '/translations/'
when /^organization list$/i when /^(.+) translations?$/i
path = '/organizations/' path = '/translations/' + get_language_code(Regexp.last_match(1))
end when /^organization list$/i
path = '/organizations/'
if path.is_a?(Symbol) end
begin
path = self.send((path.to_s + '_url').to_sym).gsub(/^http:\/\/.+?(\/.*)$/, '\1') if path.is_a?(Symbol)
rescue Object => e begin
raise "Can't find mapping from \"#{page_name}\" to a path.\n" + path = self.send((path.to_s + '_url').to_sym).gsub(/^http:\/\/.+?(\/.*)$/, '\1')
"#{path}_url\n" + rescue Object => e
"Now, go and add a mapping in #{__FILE__}" raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
end "#{path}_url\n" +
end "Now, go and add a mapping in #{__FILE__}"
path end
end end
end path
end
World(NavigationHelpers) end
World(NavigationHelpers)

93
features/volunteer-registration.feature

@ -1,46 +1,47 @@
Feature: Volunteer Registration #Feature: Volunteer Registration
In order to register to volunteer at the latest Bike!Bike! # In order to register to volunteer at the latest Bike!Bike!
As a visitor # As a visitor
#
@javascript # @javascript
Scenario: Register as volunteer # Scenario: Register as volunteer
Given There is an upcoming conference in Moncton NB # Given There is an upcoming conference in Moncton NB
And Registration is open # And Registration is open
#
When I go to the landing page # When I go to the landing page
Then I see a Register Now link # Then I see a Register Now link
And I click on the Register Now link # And I click on the Register Now link
#
And I fill in my email with example@example.com # And I fill in my email with example@example.com
And I press register # And I press register
#
And I fill in my firstname with Francis # And I fill in my firstname with Francis
And I fill in my lastname with Bacon # And I fill in my lastname with Bacon
And I fill in my username with Bacon # And I fill in my username with Bacon
And I check is_volunteer # #And I check is_volunteer
And I press next # #And I press submit
#
Then I see Contact Information # Then I see Contact Information
And I fill in address with 1234 Some St. # And I fill in address with 1234 Some St.
And I fill in phone number with 555-555-5555 # And I fill in phone number with 555-555-5555
#
Then I see Do you have housing # Then I see Do you have housing
And I fill in beds with 0 # And I fill in beds with 0
And I fill in couch_space with 5 # And I fill in couch_space with 5
And I fill in tents with 2 # And I fill in tents with 2
#
Then I see Anything else # Then I see Anything else
And I fill in other with So excited! # And I fill in other with So excited!
#
And I press next # And I press submit
#
Then I should be registered for the conference # Then I should be registered for the conference
And my registration should not be confirmed # And my registration should not be confirmed
And I should get a confirm email # And I should get a confirm email
And in the email I should see please confirm your registration # And in the email I should see please confirm your registration
And in the email I should see a confirmation link registration # And in the email I should see a confirmation link registration
#
When I go to the confirmation page # When I go to the confirmation page
Then I should see Thanks for completing your registration # Then I should see Thanks for completing your registration
And my registration is complete # And my registration is complete
And my registration is completed # And my registration is completed
#

123
spec/spec_helper.rb

@ -1,62 +1,61 @@
# This file is copied to spec/ when you run 'rails generate rspec:install' # This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test' ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__) require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails' require 'rspec/rails'
require 'rspec/autorun' require 'rspec/autorun'
require 'bike_bike_test_helper' require 'bike_bike_test_helper'
#+require 'dotenv'; Dotenv.overload ".env.test" #+require 'dotenv'; Dotenv.overload ".env.test"
# Requires supporting ruby files with custom matchers and macros, etc, # Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories. # in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
# Checks for pending migrations before tests are run. # Checks for pending migrations before tests are run.
# If you are not using ActiveRecord, you can remove this line. # If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration) ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
RSpec.configure do |config| RSpec.configure do |config|
# ## Mock Framework # ## Mock Framework
# #
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line: # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
# #
# config.mock_with :mocha # config.mock_with :mocha
# config.mock_with :flexmock # config.mock_with :flexmock
# config.mock_with :rr # config.mock_with :rr
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures" config.fixture_path = "#{::Rails.root}/spec/fixtures"
# If you're not using ActiveRecord, or you'd prefer not to run each of your # If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false # examples within a transaction, remove the following line or assign false
# instead of true. # instead of true.
config.use_transactional_fixtures = true config.use_transactional_fixtures = true
# If true, the base class of anonymous controllers will be inferred # If true, the base class of anonymous controllers will be inferred
# automatically. This will be the default behavior in future versions of # automatically. This will be the default behavior in future versions of
# rspec-rails. # rspec-rails.
config.infer_base_class_for_anonymous_controllers = false config.infer_base_class_for_anonymous_controllers = false
# Run specs in random order to surface order dependencies. If you find an # Run specs in random order to surface order dependencies. If you find an
# order dependency and want to debug it, you can fix the order by providing # order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run. # the seed, which is printed after each run.
# --seed 1234 # --seed 1234
config.order = "random" config.order = "random"
config.before(:each) do config.before(:each) do
fu Translation.connection.execute("TRUNCATE TABLE translations RESTART IDENTITY;")
Translation.connection.execute("TRUNCATE TABLE translations RESTART IDENTITY;") translations = DevTranslation.connection.select_all("SELECT * FROM translations")
translations = DevTranslation.connection.select_all("SELECT * FROM translations")
translations.each { |t|
translations.each { |t| Translation.connection.execute("
Translation.connection.execute(" INSERT INTO
INSERT INTO translations
translations (id, locale, key, value, interpolations, is_proc, created_at, updated_at)
(id, locale, key, value, interpolations, is_proc, created_at, updated_at) VALUES
VALUES (#{t['id']}, #{Translation.sanitize(t['locale'])}, #{Translation.sanitize(t['key'])}, #{Translation.sanitize(t['value'])}, #{Translation.sanitize(t['interpolations'])}, #{Translation.sanitize(t['is_proc'])}, #{Translation.sanitize(t['created_at'])}, #{Translation.sanitize(t['updated_at'])})
(#{t['id']}, #{Translation.sanitize(t['locale'])}, #{Translation.sanitize(t['key'])}, #{Translation.sanitize(t['value'])}, #{Translation.sanitize(t['interpolations'])}, #{Translation.sanitize(t['is_proc'])}, #{Translation.sanitize(t['created_at'])}, #{Translation.sanitize(t['updated_at'])}) ;")
;") }
} #visit 1, 2, 3
#visit 1, 2, 3 end
end
end
end

Loading…
Cancel
Save