From 5dba9177a056b2d46d1751d40cdc7dcd0ce29f7e Mon Sep 17 00:00:00 2001 From: John Bintz Date: Thu, 8 Sep 2011 23:31:33 -0400 Subject: [PATCH] initial commit --- .gitignore | 1 + .travis.yml | 5 +++++ Gemfile | 2 ++ Gemfile.lock | 29 ++++++++++++++++++++++++++++ Rakefile | 5 +++++ public/javascripts/test.coffee | 3 +++ spec/javascripts/support/jasmine.yml | 8 ++++++++ spec/javascripts/test_spec.coffee | 5 +++++ 8 files changed, 58 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 Rakefile create mode 100644 public/javascripts/test.coffee create mode 100644 spec/javascripts/support/jasmine.yml create mode 100644 spec/javascripts/test_spec.coffee diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d5063e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.jhw-cache/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2b39d43 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +before_script: "sh -e /etc/init.d/xvfb start" +script: "DISPLAY=:99.0 bundle exec rake jasmine:headless" +rvm: + - 1.9.2 + diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..4b43f65 --- /dev/null +++ b/Gemfile @@ -0,0 +1,2 @@ +gem 'jasmine-headless-webkit', :git => 'git://github.com/johnbintz/jasmine-headless-webkit.git' +gem 'rake', '0.9.2' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..5aa8432 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,29 @@ +GIT + remote: git://github.com/johnbintz/jasmine-headless-webkit.git + revision: 7bd689439728ad5deb77b1cf59917e437a0a5355 + specs: + jasmine-headless-webkit (0.7.0) + coffee-script (>= 2.2) + jasmine-core (~> 1.1.beta) + multi_json + rainbow + +GEM + specs: + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.1.2) + execjs (1.2.4) + multi_json (~> 1.0) + jasmine-core (1.1.0.rc4) + multi_json (1.0.3) + rainbow (1.1.1) + rake (0.9.2) + +PLATFORMS + ruby + +DEPENDENCIES + jasmine-headless-webkit! + rake (= 0.9.2) diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..022c026 --- /dev/null +++ b/Rakefile @@ -0,0 +1,5 @@ +require 'jasmine-headless-webkit' + +Jasmine::Headless::Task.new + +task :default => 'jasmine:headless' diff --git a/public/javascripts/test.coffee b/public/javascripts/test.coffee new file mode 100644 index 0000000..24dca6f --- /dev/null +++ b/public/javascripts/test.coffee @@ -0,0 +1,3 @@ +class window.Test + yes: => true + diff --git a/spec/javascripts/support/jasmine.yml b/spec/javascripts/support/jasmine.yml new file mode 100644 index 0000000..8697f57 --- /dev/null +++ b/spec/javascripts/support/jasmine.yml @@ -0,0 +1,8 @@ +spec_dir: 'spec/javascripts' +src_dir: 'public/javascripts' + +src_files: + - 'test.coffee' +spec_files: + - 'test_spec.coffee' + diff --git a/spec/javascripts/test_spec.coffee b/spec/javascripts/test_spec.coffee new file mode 100644 index 0000000..3061944 --- /dev/null +++ b/spec/javascripts/test_spec.coffee @@ -0,0 +1,5 @@ +describe 'Test', -> + it 'should be true', -> + test = new Test() + expect(test.yes()).toEqual(true) +