Skip to content

Commit

Permalink
Added single test execution to rakefile targets
Browse files Browse the repository at this point in the history
  • Loading branch information
brianto committed Feb 15, 2013
1 parent 637ccb9 commit 46a8c06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Rakefile
Expand Up @@ -158,6 +158,11 @@ namespace :test do
lua_test "src", "test", "**", "*.lua"
end

desc "runs a single lua test"
task :single, [:filepath] => [:setup_lua_path] do |task, params|
lua_test "src", "test", "#{params[:filepath]}.lua"
end

desc "runs all tests in src/tests/server"
task :server => :setup_lua_path do
lua_test "src", "test", "server", "*.lua"
Expand Down
4 changes: 2 additions & 2 deletions src/test/core/test-core.lua
@@ -1,9 +1,9 @@
describe["derp"] = function()
describe["core"] = function()
before = function()
card = 0
end

it["should be zero"] = function()
expect(card).should_be(1) -- fail
expect(card).should_be(0)
end
end

0 comments on commit 46a8c06

Please sign in to comment.