Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename to everqueen

  • Loading branch information...
commit 15f7854a65512606c123476e52f842cd53c9d2b3 1 parent e66fce8
@airhorns authored
Showing with 216 additions and 265 deletions.
  1. +38 −78 README.rdoc
  2. +2 −2 bin/{everblue → everqueen}
  3. +1 −1  config/routes.rb
  4. +6 −6 everblue.gemspec → everqueen.gemspec
  5. +0 −29 lib/everblue/cli.rb
  6. +0 −14 lib/everblue/rails.rb
  7. +0 −32 lib/everblue/suite.rb
  8. +0 −17 lib/everblue/views/layout.erb
  9. +12 −12 lib/{everblue.rb → everqueen.rb}
  10. +5 −6 lib/{everblue → everqueen}/application.rb
  11. 0  lib/{everblue → everqueen}/assets/elabs.png
  12. 0  lib/{everblue/assets/everblue.scss.css → everqueen/assets/everqueen.scss.css}
  13. 0  lib/{everblue → everqueen}/assets/jquery.js
  14. 0  lib/{everblue → everqueen}/assets/json2.js
  15. +5 −5 lib/{everblue → everqueen}/assets/list.js.coffee
  16. +8 −8 lib/{everblue → everqueen}/assets/run.js.coffee.erb
  17. 0  lib/{everblue → everqueen}/assets/start.js.coffee
  18. 0  lib/{everblue → everqueen}/assets/test_helper.js
  19. +29 −0 lib/everqueen/cli.rb
  20. +14 −0 lib/everqueen/rails.rb
  21. +7 −7 lib/{everblue → everqueen}/runner.rb
  22. +3 −3 lib/{everblue → everqueen}/server.rb
  23. +32 −0 lib/everqueen/suite.rb
  24. +3 −3 lib/{everblue → everqueen}/tasks.rb
  25. +2 −2 lib/{everblue → everqueen}/test.rb
  26. +1 −1  lib/{everblue → everqueen}/version.rb
  27. 0  lib/{everblue → everqueen}/views/_test_error.erb
  28. +17 −0 lib/everqueen/views/layout.erb
  29. +1 −1  lib/{everblue → everqueen}/views/list.erb
  30. +1 −1  lib/{everblue → everqueen}/views/run.erb
  31. +0 −8 lib/tasks/everblue.rake
  32. +2 −2 lib/tasks/{evergreen.rake → everqueen.rake}
  33. +1 −1  spec/{everblue_spec.rb → everqueen_spec.rb}
  34. +5 −5 spec/meta_spec.rb
  35. +3 −3 spec/runner_spec.rb
  36. +9 −9 spec/spec_helper.rb
  37. +1 −1  spec/suite2/config/{everblue.rb → everqueen.rb}
  38. +3 −3 spec/suite_spec.rb
  39. +5 −5 spec/test_spec.rb
View
116 README.rdoc
@@ -1,40 +1,39 @@
-= Everblue
+= Everqueen
-{<img src="http://travis-ci.org/jnicklas/everblue.png" />}[http://travis-ci.org/jnicklas/everblue]
+{<img src="http://travis-ci.org/hornairs/everqueen.png" />}[http://travis-ci.org/hornairs/everqueen]
-"Because green is the new Blue(Ridge)"
+"Because QUnit is just really simple."
-Everblue is a tool to run javascript unit tests for client side JavaScript. It
+Everqueen is a tool to run javascript unit tests for client side JavaScript. It
combines a server which allows you to serve up and run your tests in a browser,
as well as a runner which uses Capybara and any of its drivers to run your
-tests. Everblue uses the QUnit unit testing framework for JavaScript.
+tests. Everqueen uses the QUnit unit testing framework for JavaScript.
-http://github.com/hornairs/everblue
+http://github.com/hornairs/everqueen
+
+== Fork Note
+
+Everqueen is a serious fork of {Evergreen}[http://github.com/jnicklas/evergreen] by Jonas Nicklas.
+Evergreen rocks, but we wanted to use QUnit instead of Jasmine, and use Sprockets for serving up
+test files instead of the homebrew require system in Evergreen. Thank Jonas for his awesome
+OSS work on Evergreen, because he took us 99% of the way there.
== Philosophy
-Everblue is a unit testing tool. Its purpose is to test JavaScript in
+Everqueen is a unit testing tool. Its purpose is to test JavaScript in
isolation from your application. If you need a tool that tests how your
JavaScript integrates with your application you should use an integration
testing framework, such as {Capybara}[http://github.com/jnicklas/capybara].
-== Community
-
-Please ask questions on the {mailing
-list}[http://groups.google.com/group/ruby-everblue]. If you have found a
-reproducible error, please {file it on
-GitHub}[https://github.com/jnicklas/everblue/issues]. Do not contact the
-maintainers directly.
-
== Installation
Install as a Ruby gem:
- gem install everblue
+ gem install everqueen
== Usage
-Everblue assumes a file and directory structure, place all your javascript
+Everqueen assumes a file and directory structure, place all your javascript
code inside ./public and all test files inside ./test/javascripts. All test
files should end in _test.js. For example:
@@ -45,26 +44,26 @@ You can require files from the public directory inside your test file:
require('/javascripts/widget.js')
- describe('a widget', function() {
+ test('a widget', function() {
...
});
You can now look at your test files inside a browser by starting up the
-Everblue server:
+Everqueen server:
- everblue serve
+ everqueen serve
Alternatively you can run the tests headlessly by running:
- everblue run
+ everqueen run
== Integrating with Rails 3
-Add Everblue to your Gemfile:
+Add Everqueen to your Gemfile:
- gem 'everblue', :require => 'everblue/rails'
+ gem 'everqueen', :require => 'everqueen/rails'
-Start your rails application and navigate to /everblue. You should now see a
+Start your rails application and navigate to /everqueen. You should now see a
list of all test files, click on one to run it.
There's a rake task provided for you that you can use to run your tests:
@@ -75,73 +74,34 @@ There's a rake task provided for you that you can use to run your tests:
Add the following line to your Rakefile:
- require 'everblue/tasks'
+ require 'everqueen/tasks'
This will give you the `test:javascripts` rake task. Note that mounting is not
-possible under Rails 2 and that `require 'everblue/rails'` will fail.
+possible under Rails 2 and that `require 'everqueen/rails'` will fail.
== Configuration
-By default, Everblue uses Selenium to run your tests and assumes a certain
+By default, Everqueen uses Selenium to run your tests and assumes a certain
directory structure. If this standard is fine for you, then you don't need to
-do anything else. If you need to configure Everblue to suit your needs,
-Everblue will automatically look for and load the following files:
+do anything else. If you need to configure Everqueen to suit your needs,
+Everqueen will automatically look for and load the following files:
- config/everblue.rb
- .everblue
- ~/.everblue
+ config/everqueen.rb
+ .everqueen
+ ~/.everqueen
The content of these files could look like this:
require 'capybara-webkit'
- Everblue.configure do |config|
+ Everqueen.configure do |config|
config.driver = :webkit
config.public_dir = 'public_html'
- config.template_dir = 'templates'
config.test_dir = 'test'
end
-== Transactions
-
-One problem often faced when writing unit tests for client side code is that
-changes to the page are not reverted for the next example, so that successive
-examples become dependent on each other. Everblue adds a testial div to your
-page with an id of test. This div is automatically emptied before each example.
-You should avoid appending markup to the page body and instead append it to
-this test div:
-
- describe('transactions', function() {
- it("should add stuff in one test...", function() {
- $('#test').append('<h1 id="added">New Stuff</h1>');
- expect($('#test h1#added').length).toEqual(1);
- });
-
- it("... should have been removed before the next starts", function() {
- expect($('#test h1#added').length).toEqual(0);
- });
- });
-
-== Templates
-
-Even more powerful than that, Everblue allows you to create HTML templates to
-go along with your tests. Put the templates in their own folder like this:
-
- test/javascripts/templates/one_template.html
- test/javascripts/templates/another_template.html
-
-You can then load the template into the test div, by calling the template
-function in your tests:
-
- describe('transactions', function() {
- template('one_template.html')
-
- it("should load the template in this test", function() {
- ...
- });
- });
-== test Helper
+== Test Helper
If you add a test_helper file like so:
@@ -152,8 +112,8 @@ matchers and the like.
== CoffeeScript
-Everblue supports tests written in
-{CoffeeScript}[http://github.com/jashkenas/coffee-script]. Just name your test
+Everqueen supports tests written in
+{CoffeeScript}[http://github.com/jashkenas/coffee-script] via Sprockets. Just name your test
file _test.coffee and it will automatically be translated for you.
You can also add a CoffeeScript test helper, but remember that CoffeeScript
@@ -167,15 +127,15 @@ test helper to be available in your test files, attach it to the window object:
== Development
-If you plan to work on Everblue, you need to checkout the QUnit library, which
+If you plan to work on Everqueen, you need to checkout the QUnit library, which
is added as a git submodule. Run the following command:
git submodule update --init
-If you're using a version of Everblue from git with bundler, you need to tell
+If you're using a version of Everqueen from git with bundler, you need to tell
bundler to use submodules, this can be achieved with the following command:
- gem 'everblue', :submodules => true, :git => 'git://github.com/jnicklas/everblue.git'
+ gem 'everqueen', :submodules => true, :git => 'git://github.com/jnicklas/everqueen.git'
== License:
View
4 bin/everblue → bin/everqueen
@@ -2,11 +2,11 @@
$:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
-require 'everblue'
+require 'everqueen'
begin
# The dup is to keep ARGV intact, so that tools like ruby-debug can respawn.
- success = Everblue::Cli.execute(ARGV.dup)
+ success = Everqueen::Cli.execute(ARGV.dup)
Kernel.exit(success ? 0 : 1)
rescue SystemExit => e
Kernel.exit(e.status)
View
2  config/routes.rb
@@ -1,3 +1,3 @@
Rails.application.routes.draw do
- mount Everblue::Application, :at => '/everblue'
+ mount Everqueen::Application, :at => '/everqueen'
end
View
12 everblue.gemspec → everqueen.gemspec
@@ -2,12 +2,12 @@
lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)
-require 'everblue/version'
+require 'everqueen/version'
Gem::Specification.new do |s|
- s.name = "everblue"
- s.rubyforge_project = "everblue"
- s.version = Everblue::VERSION
+ s.name = "everqueen"
+ s.rubyforge_project = "everqueen"
+ s.version = Everqueen::VERSION
s.authors = ["Jonas Nicklas"]
s.email = ["jonas.nicklas@gmail.com"]
@@ -15,9 +15,9 @@ Gem::Specification.new do |s|
s.files = Dir.glob("{bin,lib,spec,config}/**/*") + %w(README.rdoc)
s.extra_rdoc_files = ["README.rdoc"]
- s.executables = ['everblue']
+ s.executables = ['everqueen']
- s.homepage = "http://github.com/jnicklas/everblue"
+ s.homepage = "http://github.com/jnicklas/everqueen"
s.rdoc_options = ["--main", "README.rdoc"]
s.require_paths = ["lib"]
s.rubygems_version = "1.3.6"
View
29 lib/everblue/cli.rb
@@ -1,29 +0,0 @@
-module Everblue
- class Cli
- def self.execute(argv)
- new.execute(argv)
- end
-
- def execute(argv)
- command = argv.shift
- Everblue.root = File.expand_path(argv.shift || '.', Dir.pwd)
-
- # detect Rails apps
- if File.exist?(File.join(Everblue.root, 'config/environment.rb'))
- require File.join(Everblue.root, 'config/environment.rb')
- require 'everblue/rails' if defined?(Rails)
- end
-
- case command
- when "serve"
- Everblue::Server.new.serve
- return true
- when "run"
- return Everblue::Runner.new.run
- else
- puts "no such command '#{command}'"
- return false
- end
- end
- end
-end
View
14 lib/everblue/rails.rb
@@ -1,14 +0,0 @@
-require 'everblue'
-require 'rails'
-
-module Everblue
- if defined?(Rails::Engine)
- class Railtie < Rails::Engine
- initializer 'everblue.config' do
- Everblue.application = Rails.application
- Everblue.root = Rails.root
- Everblue.mounted_at = "/everblue"
- end
- end
- end
-end
View
32 lib/everblue/suite.rb
@@ -1,32 +0,0 @@
-module Everblue
- class Suite
- attr_reader :driver
-
- def initialize
- paths = [
- File.expand_path("config/everblue.rb", root),
- File.expand_path(".everblue", root),
- "#{ENV["HOME"]}/.everblue"
- ]
- paths.each { |path| load(path) if File.exist?(path) }
- end
-
- def root
- Everblue.root
- end
-
- def mounted_at
- Everblue.mounted_at
- end
-
- def get_test(name)
- Test.new(self, name)
- end
-
- def tests
- Dir.glob(File.join(root, Everblue.test_dir, '**/*_test.{js,coffee}')).map do |path|
- Test.new(self, path.gsub(File.join(root, Everblue.test_dir, ''), ''))
- end
- end
- end
-end
View
17 lib/everblue/views/layout.erb
@@ -1,17 +0,0 @@
-<!doctype html>
-
-<html>
- <head>
- <title>Everblue</title>
- <link rel="stylesheet" type="text/css" href="<%= url('/assets/everblue.css') %>"/>
- <meta http-equiv="content-type" content="text/html;charset=utf-8" />
- </head>
- <body>
- <%= yield %>
-
- <div id="footer">
- Powered by <a href="http://github.com/jnicklas/everblue">Everblue</a>.
- Everblue is sponsored by <a class="elabs" href="http://elabs.se"><img alt="Elabs" src="<%= url('/assets/elabs.png') %>"> Elabs</a>.
- </div>
- </body>
-</html>
View
24 lib/everblue.rb → lib/everqueen.rb
@@ -3,16 +3,16 @@
require 'capybara'
require 'launchy'
require 'coffee-script'
-require 'everblue/version'
-require 'everblue/application'
+require 'everqueen/version'
+require 'everqueen/application'
require 'json'
-module Everblue
- autoload :Cli, 'everblue/cli'
- autoload :Server, 'everblue/server'
- autoload :Runner, 'everblue/runner'
- autoload :Suite, 'everblue/suite'
- autoload :Test, 'everblue/test'
+module Everqueen
+ autoload :Cli, 'everqueen/cli'
+ autoload :Server, 'everqueen/server'
+ autoload :Runner, 'everqueen/runner'
+ autoload :Suite, 'everqueen/suite'
+ autoload :Test, 'everqueen/test'
class << self
attr_accessor :driver, :public_dir, :test_dir, :root, :mounted_at, :application
@@ -23,7 +23,7 @@ def configure
def use_defaults!
configure do |config|
- config.application = Everblue::Application
+ config.application = Everqueen::Application
config.driver = :selenium
config.public_dir = 'public'
config.test_dir = 'test/javascripts'
@@ -54,13 +54,13 @@ def update_asset_paths(new_dir, old_dir)
return if root.nil?
old_dir = File.expand_path(old_dir, root)
new_dir = File.expand_path(new_dir, root)
- old_paths = Everblue::AssetsEnvironment.clear_paths
+ old_paths = Everqueen::AssetsEnvironment.clear_paths
old_paths.delete(old_dir)
old_paths.unshift(new_dir).each do |dir|
- Everblue::AssetsEnvironment.append_path(dir)
+ Everqueen::AssetsEnvironment.append_path(dir)
end
end
end
end
-Everblue.use_defaults!
+Everqueen.use_defaults!
View
11 lib/everblue/application.rb → lib/everqueen/application.rb
@@ -1,6 +1,6 @@
require 'sprockets'
-module Everblue
+module Everqueen
class TestApplication < Sinatra::Base
set :static, false
@@ -8,23 +8,22 @@ class TestApplication < Sinatra::Base
helpers do
def url(path)
- Everblue.mounted_at.to_s + path.to_s
+ Everqueen.mounted_at.to_s + path.to_s
end
end
get '/' do
- Everblue.root = "/Users/hornairs/Code/everblue/spec/suite1"
- @suite = Everblue::Suite.new
+ @suite = Everqueen::Suite.new
erb :list
end
get '/run/all' do
- @suite = Everblue::Suite.new
+ @suite = Everqueen::Suite.new
erb :run
end
get '/run/*' do |name|
- @suite = Everblue::Suite.new
+ @suite = Everqueen::Suite.new
@test = @suite.get_test(name)
erb :run
end
View
0  lib/everblue/assets/elabs.png → lib/everqueen/assets/elabs.png
File renamed without changes
View
0  lib/everblue/assets/everblue.scss.css → lib/everqueen/assets/everqueen.scss.css
File renamed without changes
View
0  lib/everblue/assets/jquery.js → lib/everqueen/assets/jquery.js
File renamed without changes
View
0  lib/everblue/assets/json2.js → lib/everqueen/assets/json2.js
File renamed without changes
View
10 lib/everblue/assets/list.js.coffee → lib/everqueen/assets/list.js.coffee
@@ -1,6 +1,6 @@
-window.Everblue = Everblue = {}
+window.Everqueen = Everqueen = {}
-Everblue.Test = (element) ->
+Everqueen.Test = (element) ->
self = this
@element = $(element)
@runLink = @element.find(".run")
@@ -8,7 +8,7 @@ Everblue.Test = (element) ->
self.run()
false
-Everblue.Test::run = ->
+Everqueen.Test::run = ->
self = this
@iframe = $("<iframe></iframe>").attr("src", @runLink.attr("href")).appendTo(@element)
@iframe.css
@@ -22,7 +22,7 @@ Everblue.Test::run = ->
innerQUnit.done (results) ->
self.done results
-Everblue.Test::done = (results) ->
+Everqueen.Test::done = (results) ->
@runLink.removeClass "running"
if results.failed > 0
@runLink.addClass("fail").removeClass("pass").text "Fail"
@@ -32,4 +32,4 @@ Everblue.Test::done = (results) ->
$ ->
$("#tests li, #all").each ->
- new Everblue.Test(this)
+ new Everqueen.Test(this)
View
16 lib/everblue/assets/run.js.coffee.erb → lib/everqueen/assets/run.js.coffee.erb
@@ -4,19 +4,19 @@
#= require_self
#= require test_helper
-Everblue =
+Everqueen =
done: false
dots: ""
- driver: <%= Everblue.driver.to_json %>
+ driver: <%= Everqueen.driver.to_json %>
results: []
-Everblue.getResults = ->
- JSON.stringify Everblue.results
+Everqueen.getResults = ->
+ JSON.stringify Everqueen.results
currentTest = {}
QUnit.testDone (results) ->
- Everblue.dots += (if results.failed > 0 then "F" else ".")
- Everblue.results.push
+ Everqueen.dots += (if results.failed > 0 then "F" else ".")
+ Everqueen.results.push
name: results.name
passed: results.failed is 0
message: currentTest.message
@@ -33,7 +33,7 @@ QUnit.log (results) ->
currentTest.trace = results.source
QUnit.done (results) ->
- Everblue.done = true
+ Everqueen.done = true
QUnit.config.autorun = false
-window.Everblue = Everblue
+window.Everqueen = Everqueen
View
0  lib/everblue/assets/start.js.coffee → lib/everqueen/assets/start.js.coffee
File renamed without changes
View
0  lib/everblue/assets/test_helper.js → lib/everqueen/assets/test_helper.js
File renamed without changes
View
29 lib/everqueen/cli.rb
@@ -0,0 +1,29 @@
+module Everqueen
+ class Cli
+ def self.execute(argv)
+ new.execute(argv)
+ end
+
+ def execute(argv)
+ command = argv.shift
+ Everqueen.root = File.expand_path(argv.shift || '.', Dir.pwd)
+
+ # detect Rails apps
+ if File.exist?(File.join(Everqueen.root, 'config/environment.rb'))
+ require File.join(Everqueen.root, 'config/environment.rb')
+ require 'everqueen/rails' if defined?(Rails)
+ end
+
+ case command
+ when "serve"
+ Everqueen::Server.new.serve
+ return true
+ when "run"
+ return Everqueen::Runner.new.run
+ else
+ puts "no such command '#{command}'"
+ return false
+ end
+ end
+ end
+end
View
14 lib/everqueen/rails.rb
@@ -0,0 +1,14 @@
+require 'everqueen'
+require 'rails'
+
+module Everqueen
+ if defined?(Rails::Engine)
+ class Railtie < Rails::Engine
+ initializer 'everqueen.config' do
+ Everqueen.application = Rails.application
+ Everqueen.root = Rails.root
+ Everqueen.mounted_at = "/everqueen"
+ end
+ end
+ end
+end
View
14 lib/everblue/runner.rb → lib/everqueen/runner.rb
@@ -1,4 +1,4 @@
-module Everblue
+module Everqueen
class Runner
class Example
def initialize(row)
@@ -50,17 +50,17 @@ def examples
previous_results = ""
session.wait_until(300) do
- dots = session.evaluate_script('Everblue.dots')
+ dots = session.evaluate_script('Everqueen.dots')
io.print dots.sub(/^#{Regexp.escape(previous_results)}/, '')
io.flush
previous_results = dots
- session.evaluate_script('Everblue.done')
+ session.evaluate_script('Everqueen.done')
end
- dots = session.evaluate_script('Everblue.dots')
+ dots = session.evaluate_script('Everqueen.dots')
io.print dots.sub(/^#{Regexp.escape(previous_results)}/, '')
- JSON.parse(session.evaluate_script('Everblue.getResults()')).map do |row|
+ JSON.parse(session.evaluate_script('Everqueen.getResults()')).map do |row|
Example.new(row)
end
end
@@ -135,11 +135,11 @@ def failure_messages
end
def session
- @session ||= Capybara::Session.new(Everblue.driver, Everblue.application)
+ @session ||= Capybara::Session.new(Everqueen.driver, Everqueen.application)
end
def suite
- @suite ||= Everblue::Suite.new
+ @suite ||= Everqueen::Suite.new
end
protected
View
6 lib/everblue/server.rb → lib/everqueen/server.rb
@@ -1,19 +1,19 @@
require 'coffee_script'
-module Everblue
+module Everqueen
class Server
attr_reader :suite
def serve
server.boot
- Launchy.open(server.url(Everblue.mounted_at.to_s + '/'))
+ Launchy.open(server.url(Everqueen.mounted_at.to_s + '/'))
sleep
end
protected
def server
- @server ||= Capybara::Server.new(Everblue.application)
+ @server ||= Capybara::Server.new(Everqueen.application)
end
end
end
View
32 lib/everqueen/suite.rb
@@ -0,0 +1,32 @@
+module Everqueen
+ class Suite
+ attr_reader :driver
+
+ def initialize
+ paths = [
+ File.expand_path("config/everqueen.rb", root),
+ File.expand_path(".everqueen", root),
+ "#{ENV["HOME"]}/.everqueen"
+ ]
+ paths.each { |path| load(path) if File.exist?(path) }
+ end
+
+ def root
+ Everqueen.root
+ end
+
+ def mounted_at
+ Everqueen.mounted_at
+ end
+
+ def get_test(name)
+ Test.new(self, name)
+ end
+
+ def tests
+ Dir.glob(File.join(root, Everqueen.test_dir, '**/*_test.{js,coffee}')).map do |path|
+ Test.new(self, path.gsub(File.join(root, Everqueen.test_dir, ''), ''))
+ end
+ end
+ end
+end
View
6 lib/everblue/tasks.rb → lib/everqueen/tasks.rb
@@ -1,10 +1,10 @@
-require 'everblue'
+require 'everqueen'
# Rails 2.3 Rake tasks
namespace :spec do
- desc "Run JavaScript specs via Everblue"
+ desc "Run JavaScript specs via Everqueen"
task :javascripts => :environment do
- result = Everblue::Runner.new.run
+ result = Everqueen::Runner.new.run
Kernel.exit(1) unless result
end
end
View
4 lib/everblue/test.rb → lib/everqueen/test.rb
@@ -1,6 +1,6 @@
require 'open3'
-module Everblue
+module Everqueen
class Test
attr_reader :name, :suite
@@ -14,7 +14,7 @@ def root
end
def full_path
- File.join(root, Everblue.test_dir, name)
+ File.join(root, Everqueen.test_dir, name)
end
alias_method :asset_path, :name
View
2  lib/everblue/version.rb → lib/everqueen/version.rb
@@ -1,3 +1,3 @@
-module Everblue
+module Everqueen
VERSION = '1.0.0'
end
View
0  lib/everblue/views/_test_error.erb → lib/everqueen/views/_test_error.erb
File renamed without changes
View
17 lib/everqueen/views/layout.erb
@@ -0,0 +1,17 @@
+<!doctype html>
+
+<html>
+ <head>
+ <title>Everqueen</title>
+ <link rel="stylesheet" type="text/css" href="<%= url('/assets/everqueen.css') %>"/>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8" />
+ </head>
+ <body>
+ <%= yield %>
+
+ <div id="footer">
+ Powered by <a href="http://github.com/jnicklas/everqueen">Everqueen</a>.
+ Everqueen is sponsored by <a class="elabs" href="http://elabs.se"><img alt="Elabs" src="<%= url('/assets/elabs.png') %>"> Elabs</a>.
+ </div>
+ </body>
+</html>
View
2  lib/everblue/views/list.erb → lib/everqueen/views/list.erb
@@ -1,7 +1,7 @@
<script type="text/javascript" src="<%= url("/assets/jquery.js") %>"></script>
<script type="text/javascript" src="<%= url("/assets/list.js") %>"></script>
<div id="page">
- <h1>Everblue</h1>
+ <h1>Everqueen</h1>
<div id="all">
<a class="all" href="<%= url('/run/all') %>">All</a>
View
2  lib/everblue/views/run.erb → lib/everqueen/views/run.erb
@@ -8,7 +8,7 @@
<% end %>
<div id="page">
- <h1 id="qunit-header">Everblue</h1>
+ <h1 id="qunit-header">Everqueen</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
View
8 lib/tasks/everblue.rake
@@ -1,8 +0,0 @@
-# Rails 3.0/3.1 Rake tasks
-namespace :spec do
- desc "Run JavaScript specs via Everblue"
- task :javascripts => :environment do
- result = Everblue::Runner.new.run
- Kernel.exit(1) unless result
- end
-end
View
4 lib/tasks/evergreen.rake → lib/tasks/everqueen.rake
@@ -1,8 +1,8 @@
# Rails 3.0/3.1 Rake tasks
namespace :test do
- desc "Run JavaScript tests via Everblue"
+ desc "Run JavaScript specs via Everqueen"
task :javascripts => :environment do
- result = Everblue::Runner.new.run
+ result = Everqueen::Runner.new.run
Kernel.exit(1) unless result
end
end
View
2  spec/everblue_spec.rb → spec/everqueen_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Everblue::Application do
+describe Everqueen::Application do
include Capybara::DSL
it "should show a successful test run" do
View
10 spec/meta_spec.rb
@@ -1,11 +1,11 @@
require 'spec_helper'
-describe Everblue::Runner do
- let(:suite) { Everblue::Suite.new }
- subject { Everblue::Test.new(suite, template) }
+describe Everqueen::Runner do
+ let(:suite) { Everqueen::Suite.new }
+ subject { Everqueen::Test.new(suite, template) }
context "with standard setup" do
- before { Everblue.root = File.expand_path('suite1', File.dirname(__FILE__)) }
+ before { Everqueen.root = File.expand_path('suite1', File.dirname(__FILE__)) }
context "with transactions test" do
let(:template) { 'transactions_test.js' }
@@ -24,7 +24,7 @@
end
context "with modified setup" do
- before { Everblue.root = File.expand_path('suite2', File.dirname(__FILE__)) }
+ before { Everqueen.root = File.expand_path('suite2', File.dirname(__FILE__)) }
context "with awesome test" do
let(:template) { 'awesome_test.js' }
View
6 spec/runner_spec.rb
@@ -1,8 +1,8 @@
require 'spec_helper'
-describe Everblue::Runner do
- let(:suite) { Everblue::Suite.new }
- let(:runner) { Everblue::Runner.new(buffer) }
+describe Everqueen::Runner do
+ let(:suite) { Everqueen::Suite.new }
+ let(:runner) { Everqueen::Runner.new(buffer) }
let(:buffer) { StringIO.new }
describe '#run' do
View
18 spec/spec_helper.rb
@@ -1,7 +1,7 @@
require 'rubygems'
require 'bundler/setup'
-require 'everblue'
+require 'everqueen'
require 'rspec'
require 'capybara/dsl'
@@ -11,16 +11,16 @@
TEST_DRIVER = :webkit
-Everblue.root = File.expand_path('suite1', File.dirname(__FILE__))
+Everqueen.root = File.expand_path('suite1', File.dirname(__FILE__))
-Capybara.app = Everblue::Application
+Capybara.app = Everqueen::Application
Capybara.default_driver = TEST_DRIVER
-module EverblueMatchers
+module EverqueenMatchers
class PassTest # :nodoc:
def matches?(actual)
@actual = actual
- @runner = Everblue::Runner.new(StringIO.new).test_runner(@actual)
+ @runner = Everqueen::Runner.new(StringIO.new).test_runner(@actual)
@runner.passed?
end
@@ -39,11 +39,11 @@ def pass
end
RSpec.configure do |config|
- config.include EverblueMatchers
+ config.include EverqueenMatchers
config.before do
Capybara.reset_sessions!
- Everblue.use_defaults!
- Everblue.root = File.expand_path('suite1', File.dirname(__FILE__))
- Everblue.driver = TEST_DRIVER
+ Everqueen.use_defaults!
+ Everqueen.root = File.expand_path('suite1', File.dirname(__FILE__))
+ Everqueen.driver = TEST_DRIVER
end
end
View
2  spec/suite2/config/everblue.rb → spec/suite2/config/everqueen.rb
@@ -1,4 +1,4 @@
-Everblue.configure do |config|
+Everqueen.configure do |config|
config.public_dir = 'public_html'
config.test_dir = 'test'
end
View
6 spec/suite_spec.rb
@@ -1,12 +1,12 @@
require 'spec_helper'
-describe Everblue::Suite do
- subject { Everblue::Suite.new }
+describe Everqueen::Suite do
+ subject { Everqueen::Suite.new }
its(:root) { should == File.expand_path('suite1', File.dirname(__FILE__)) }
describe '#get_test' do
- subject { Everblue::Suite.new.get_test('testing_test.js') }
+ subject { Everqueen::Suite.new.get_test('testing_test.js') }
its(:name) { should == 'testing_test.js' }
its(:root) { should == File.expand_path('suite1', File.dirname(__FILE__)) }
end
View
10 spec/test_spec.rb
@@ -1,12 +1,12 @@
require 'spec_helper'
-describe Everblue::Test do
- let(:suite) { Everblue::Suite.new }
- subject { Everblue::Test.new(suite, 'testing_test.js') }
+describe Everqueen::Test do
+ let(:suite) { Everqueen::Suite.new }
+ subject { Everqueen::Test.new(suite, 'testing_test.js') }
its(:name) { should == 'testing_test.js' }
its(:root) { should == File.expand_path('suite1', File.dirname(__FILE__)) }
- its(:full_path) { should == File.expand_path("test/javascripts/testing_test.js", Everblue.root) }
+ its(:full_path) { should == File.expand_path("test/javascripts/testing_test.js", Everqueen.root) }
its(:url) { should == "/run/testing_test.js" }
context "with existing test file" do
@@ -14,7 +14,7 @@
end
context "with missing test file" do
- subject { Everblue::Test.new(suite, 'does_not_exist.js') }
+ subject { Everqueen::Test.new(suite, 'does_not_exist.js') }
it { should_not exist }
end
Please sign in to comment.
Something went wrong with that request. Please try again.