Commit e5fbce6d76a7c2a42d13156f2208a09a239de880

Authored by Rafael Manzo
1 parent 64e6a134

Added Konacha for JavaScript unit testing

@@ -68,6 +68,9 @@ group :development, :test do @@ -68,6 +68,9 @@ group :development, :test do
68 # Deployment 68 # Deployment
69 gem 'capistrano' 69 gem 'capistrano'
70 gem 'rvm-capistrano' 70 gem 'rvm-capistrano'
  71 +
  72 + # JavaScript unit tests
  73 + gem "konacha", "~> 3.0.0"
71 end 74 end
72 75
73 # Acceptance tests 76 # Acceptance tests
@@ -60,6 +60,7 @@ GEM @@ -60,6 +60,7 @@ GEM
60 coffee-script-source 60 coffee-script-source
61 execjs 61 execjs
62 coffee-script-source (1.6.3) 62 coffee-script-source (1.6.3)
  63 + colorize (0.5.8)
63 cucumber (1.3.2) 64 cucumber (1.3.2)
64 builder (>= 2.1.2) 65 builder (>= 2.1.2)
65 diff-lcs (>= 1.1.3) 66 diff-lcs (>= 1.1.3)
@@ -102,6 +103,12 @@ GEM @@ -102,6 +103,12 @@ GEM
102 railties (>= 3.0, < 5.0) 103 railties (>= 3.0, < 5.0)
103 thor (>= 0.14, < 2.0) 104 thor (>= 0.14, < 2.0)
104 json (1.8.0) 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 libv8 (3.16.14.3) 112 libv8 (3.16.14.3)
106 mail (2.5.4) 113 mail (2.5.4)
107 mime-types (~> 1.16) 114 mime-types (~> 1.16)
@@ -235,6 +242,7 @@ DEPENDENCIES @@ -235,6 +242,7 @@ DEPENDENCIES
235 jbuilder (~> 1.2) 242 jbuilder (~> 1.2)
236 jquery-rails 243 jquery-rails
237 kalibro_entities! 244 kalibro_entities!
  245 + konacha (~> 3.0.0)
238 mocha 246 mocha
239 modernizr-rails 247 modernizr-rails
240 pg (~> 0.17.0) 248 pg (~> 0.17.0)
config/initializers/konacha.rb 0 → 100644
@@ -0,0 +1,8 @@ @@ -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 \ No newline at end of file 9 \ No newline at end of file
lib/tasks/konacha.rake 0 → 100644
@@ -0,0 +1,9 @@ @@ -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 \ No newline at end of file 10 \ No newline at end of file
spec/javascripts/.keep 0 → 100644