Commit e5fbce6d76a7c2a42d13156f2208a09a239de880

Authored by Rafael Manzo
1 parent 64e6a134

Added Konacha for JavaScript unit testing

Gemfile
... ... @@ -68,6 +68,9 @@ group :development, :test do
68 68 # Deployment
69 69 gem 'capistrano'
70 70 gem 'rvm-capistrano'
  71 +
  72 + # JavaScript unit tests
  73 + gem "konacha", "~> 3.0.0"
71 74 end
72 75  
73 76 # Acceptance tests
... ...
Gemfile.lock
... ... @@ -60,6 +60,7 @@ GEM
60 60 coffee-script-source
61 61 execjs
62 62 coffee-script-source (1.6.3)
  63 + colorize (0.5.8)
63 64 cucumber (1.3.2)
64 65 builder (>= 2.1.2)
65 66 diff-lcs (>= 1.1.3)
... ... @@ -102,6 +103,12 @@ GEM
102 103 railties (>= 3.0, < 5.0)
103 104 thor (>= 0.14, < 2.0)
104 105 json (1.8.0)
  106 + konacha (3.0.0)
  107 + actionpack (>= 3.1, < 5)
  108 + capybara
  109 + colorize
  110 + railties (>= 3.1, < 5)
  111 + sprockets
105 112 libv8 (3.16.14.3)
106 113 mail (2.5.4)
107 114 mime-types (~> 1.16)
... ... @@ -235,6 +242,7 @@ DEPENDENCIES
235 242 jbuilder (~> 1.2)
236 243 jquery-rails
237 244 kalibro_entities!
  245 + konacha (~> 3.0.0)
238 246 mocha
239 247 modernizr-rails
240 248 pg (~> 0.17.0)
... ...
config/initializers/konacha.rb 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +Konacha.configure do |config|
  2 + require 'capybara/poltergeist'
  3 +
  4 + config.spec_dir = "spec/javascripts"
  5 + config.spec_matcher = /_spec\.|_test\./
  6 + config.stylesheets = %w(application)
  7 + config.driver = :poltergeist
  8 +end if defined?(Konacha)
0 9 \ No newline at end of file
... ...
lib/tasks/konacha.rake 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +namespace :konacha do
  2 + task :message do
  3 + puts "Running Konacha tests...\n"
  4 + end
  5 +end
  6 +
  7 +task 'konacha:run' => 'konacha:message'
  8 +
  9 +task :default => 'konacha:run'
0 10 \ No newline at end of file
... ...
spec/javascripts/.keep 0 → 100644