All Jasmine file manipulation/development moved from Thor to Grunt. Thor has been removed completely. Run grunt --help to see available tasks.
Canonical Jasmine version now lives in `package.json` (Node formatted) and is copied into Jasmine source (JavaScript and Ruby) Jasmine distribution now has MIT license and Pivotal Labs copyright at the top of each distributed file.
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<head>
|
||||
<title>Jasmine Spec Runner: Jasmine Core</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
<link rel="shortcut icon" type="image/png" href="../images/jasmine_favicon.png">
|
||||
|
||||
<link href="../lib/jasmine-core/jasmine.css" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="../lib/jasmine-core/jasmine.js"></script>
|
||||
<script type="text/javascript" src="../lib/jasmine-core/jasmine-html.js"></script>
|
||||
<script type="text/javascript" src="../lib/jasmine-core/boot/boot.js"></script>
|
||||
|
||||
|
||||
<!--This file is not included in jasmine.js - but let's put it here for now -->
|
||||
<script type="text/javascript" src="../src/console/ConsoleReporter.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
//shim for our tests using originalJasmine.createSpy and the like that should really be using globals defined in boot.
|
||||
var originalJasmine = jasmine;
|
||||
</script>
|
||||
|
||||
<!-- include spec files here... -->
|
||||
<script type="text/javascript" src=".././spec/console/ConsoleReporterSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/ClockSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/CustomMatchersSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/DelayedFunctionSchedulerSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/EnvSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/ExceptionFormatterSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/ExceptionsSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/ExpectationResultSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/JsApiReporterSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/MatchersSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/PrettyPrintSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/QueueRunnerSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/ReportDispatcherSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/SpecRunningSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/SpecSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/SpySpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/SuiteSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/core/UtilSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/html/MatchersHtmlSpec.js"></script>
|
||||
<script type="text/javascript" src="html/HtmlReporterSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/html/PrettyPrintHtmlSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/html/QueryStringSpec.js"></script>
|
||||
<script type="text/javascript" src=".././spec/html/ResultsNodeSpec.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@@ -18,8 +18,6 @@ def project_root
|
||||
File.join(File.expand_path(File.dirname(__FILE__)), '..')
|
||||
end
|
||||
|
||||
require "#{project_root}/tasks/jasmine_dev"
|
||||
|
||||
def capture_output(capture = true)
|
||||
if capture
|
||||
output = StringIO.new
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
require 'spec_helper.rb'
|
||||
|
||||
describe "Build Github Pages task" do
|
||||
|
||||
let(:pages_dir) { File.join(Dir.tmpdir, 'pages') }
|
||||
let(:jasmine_dev) { JasmineDev.new }
|
||||
|
||||
before do
|
||||
reset_dir pages_dir
|
||||
end
|
||||
|
||||
describe "when the Github pages submodule is not present" do
|
||||
before do
|
||||
jasmine_dev.should_receive(:has_pages_submodule?).and_return(false)
|
||||
|
||||
@output = capture_output { jasmine_dev.build_github_pages pages_dir }
|
||||
end
|
||||
|
||||
it "should tell the user the task is running" do
|
||||
@output.should match(/Building Github Pages/)
|
||||
end
|
||||
|
||||
it "should prompt the user to install the submodule" do
|
||||
@output.should match(/Submodule for Github Pages isn't present/)
|
||||
end
|
||||
end
|
||||
|
||||
describe "when the Github pages submodule is present" do
|
||||
before do
|
||||
jasmine_dev.should_receive(:has_pages_submodule?).and_return(true)
|
||||
|
||||
@output = capture_output { jasmine_dev.build_github_pages pages_dir }
|
||||
end
|
||||
|
||||
it "should tell the user the task is running" do
|
||||
@output.should match(/Building Github Pages/)
|
||||
end
|
||||
|
||||
it "should copy the latest jasmine files to the pages dir" do
|
||||
['jasmine.js', 'jasmine.css', 'jasmine-html.js'].each do |lib_file|
|
||||
source = File.read(File.join(project_root, 'lib', 'jasmine-core', lib_file))
|
||||
dest = File.read(File.join(pages_dir, 'lib', lib_file))
|
||||
|
||||
source.should == dest
|
||||
end
|
||||
end
|
||||
|
||||
it "should build a new page" do
|
||||
@output.should match(/rocco/)
|
||||
File.exist?(File.join(pages_dir, 'introduction.html')).should be_true
|
||||
end
|
||||
|
||||
it "should copy the rocco output to index.html" do
|
||||
introduction = File.read(File.join(pages_dir, 'introduction.html'))
|
||||
index = File.read(File.join(pages_dir, 'index.html'))
|
||||
|
||||
index.should == introduction
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,26 +0,0 @@
|
||||
require 'spec_helper.rb'
|
||||
|
||||
describe "Spec counting task" do
|
||||
|
||||
let(:jasmine_dev) { JasmineDev.new }
|
||||
|
||||
before do
|
||||
@output = capture_output { jasmine_dev.count_specs }
|
||||
end
|
||||
|
||||
it "should tell the developer that the specs are being counted" do
|
||||
@output.should match(/Counting specs/)
|
||||
end
|
||||
|
||||
it "should report the number of specs that will run in node" do
|
||||
@output.should match(/\d+ \e\[0mspecs for Node.js/)
|
||||
end
|
||||
|
||||
it "should report the number of specs that will run in the browser" do
|
||||
@output.should match(/\d+ \e\[0mspecs for Browser/)
|
||||
end
|
||||
|
||||
it "should remind the developer to check the count" do
|
||||
@output.should match(/Please verify/)
|
||||
end
|
||||
end
|
||||
@@ -1,81 +0,0 @@
|
||||
require 'spec_helper.rb'
|
||||
|
||||
describe "Spec tasks" do
|
||||
|
||||
let(:jasmine_dev) { JasmineDev.new }
|
||||
|
||||
describe "execute_specs_in_node" do
|
||||
describe "when Node.js is not present" do
|
||||
before do
|
||||
jasmine_dev.should_receive(:has_node?).and_return(false)
|
||||
@output = capture_output { jasmine_dev.execute_specs_in_node }
|
||||
end
|
||||
|
||||
it "should prompt the user to install Node" do
|
||||
@output.should match(/Node\.js is required/)
|
||||
end
|
||||
end
|
||||
|
||||
describe "when Node.js is present" do
|
||||
before do
|
||||
jasmine_dev.should_receive(:has_node?).and_return(true)
|
||||
@output = capture_output { jasmine_dev.execute_specs_in_node }
|
||||
end
|
||||
|
||||
it "should build the distribution" do
|
||||
@output.should match(/Building Jasmine distribution/)
|
||||
end
|
||||
|
||||
it "should tell the developer that the specs are being counted" do
|
||||
@output.should match(/Counting specs/)
|
||||
end
|
||||
|
||||
it "should tell the user that the specs are running in Node.js" do
|
||||
@output.should match(/specs via Node/)
|
||||
@output.should match(/Started/)
|
||||
@output.should match(/\d+ specs, 0 failures/)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "execute_specs_in_browser" do
|
||||
before do
|
||||
jasmine_dev.should_receive(:run)
|
||||
@output = capture_output { jasmine_dev.execute_specs_in_browser }
|
||||
end
|
||||
|
||||
it "should build the distribution" do
|
||||
@output.should match(/Building Jasmine distribution/)
|
||||
end
|
||||
|
||||
it "should tell the developer that the specs are being counted" do
|
||||
@output.should match(/Counting specs/)
|
||||
end
|
||||
|
||||
it "should tell the user that the specs are running in the broswer" do
|
||||
@output.should match(/specs via the default web browser/)
|
||||
end
|
||||
end
|
||||
|
||||
describe "execute_specs" do
|
||||
before do
|
||||
@output = capture_output { jasmine_dev.execute_specs }
|
||||
end
|
||||
|
||||
it "should build the distribution" do
|
||||
@output.should match(/Building Jasmine distribution/)
|
||||
end
|
||||
|
||||
it "should tell the developer that the specs are being counted" do
|
||||
@output.should match(/Counting specs/)
|
||||
end
|
||||
|
||||
it "should tell the user that the specs are running in Node.js" do
|
||||
@output.should match(/specs via Node/)
|
||||
end
|
||||
|
||||
it "should tell the user that the specs are running in the broswer" do
|
||||
@output.should match(/specs via the default web browser/)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,39 +0,0 @@
|
||||
require 'spec_helper.rb'
|
||||
|
||||
describe "Release task" do
|
||||
|
||||
let(:jasmine_dev) { JasmineDev.new }
|
||||
|
||||
describe "when the pages submodule is not present" do
|
||||
before do
|
||||
jasmine_dev.should_receive(:has_pages_submodule?).and_return(false)
|
||||
|
||||
@output = capture_output { jasmine_dev.release_prep }
|
||||
end
|
||||
|
||||
it "should tell the user the task is running" do
|
||||
@output.should match(/Building Release/)
|
||||
end
|
||||
|
||||
it "should prompt the user to install the submodule" do
|
||||
@output.should match(/Submodule for Github Pages isn't present/)
|
||||
end
|
||||
end
|
||||
|
||||
describe "when the pages submodule is present" do
|
||||
before do
|
||||
JasmineDev.any_instance.should_receive(:write_version_files)
|
||||
JasmineDev.any_instance.should_receive(:build_distribution)
|
||||
JasmineDev.any_instance.should_receive(:build_standalone_distribution)
|
||||
JasmineDev.any_instance.should_receive(:build_github_pages)
|
||||
|
||||
jasmine_dev.should_receive(:has_pages_submodule?).and_return(true)
|
||||
|
||||
@output = capture_output { jasmine_dev.release_prep }
|
||||
end
|
||||
|
||||
it "should tell the user the task is running" do
|
||||
@output.should match(/Building Release/)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user