summaryrefslogtreecommitdiff
path: root/test/rake/test_rake_task_argument_parsing.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-23 05:38:50 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-23 05:38:50 +0000
commitc93ed570a2991f5ec059526941f442eadacc3cb1 (patch)
treecb70e0ff69911e3e49ba770fc49dcb12813b7185 /test/rake/test_rake_task_argument_parsing.rb
parent12d9be6b727bdfe605fc65f18659c4cb4d4b283c (diff)
* test/rake*: Remove dependencies on flexmock and session gems.
[Ruby 1.9 - Bug #4987] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/test_rake_task_argument_parsing.rb')
-rw-r--r--test/rake/test_rake_task_argument_parsing.rb31
1 files changed, 12 insertions, 19 deletions
diff --git a/test/rake/test_rake_task_argument_parsing.rb b/test/rake/test_rake_task_argument_parsing.rb
index 7a03b2addc..8ef9d7236b 100644
--- a/test/rake/test_rake_task_argument_parsing.rb
+++ b/test/rake/test_rake_task_argument_parsing.rb
@@ -51,38 +51,31 @@ class TestRakeTaskArgumentParsing < Rake::TestCase
end
def test_terminal_width_using_stty
- app = Rake::Application.new
-
- flexmock(app,
- :unix? => true,
- :dynamic_width_stty => 1235,
- :dynamic_width_tput => 0)
+ def @app.unix?() true end
+ def @app.dynamic_width_stty() 1235 end
+ def @app.dynamic_width_tput() 0 end
- assert_equal 1235, app.terminal_width
+ assert_equal 1235, @app.terminal_width
end
def test_terminal_width_using_tput
- app = Rake::Application.new
- flexmock(app,
- :unix? => true,
- :dynamic_width_stty => 0,
- :dynamic_width_tput => 1236)
+ def @app.unix?() true end
+ def @app.dynamic_width_stty() 0 end
+ def @app.dynamic_width_tput() 1236 end
- assert_equal 1236, app.terminal_width
+ assert_equal 1236, @app.terminal_width
end
def test_terminal_width_using_hardcoded_80
- app = Rake::Application.new
- flexmock(app, :unix? => false)
+ def @app.unix?() true end
- assert_equal 80, app.terminal_width
+ assert_equal 80, @app.terminal_width
end
def test_terminal_width_with_failure
- app = Rake::Application.new
- flexmock(app).should_receive(:unix?).and_throw(RuntimeError)
+ def @app.unix?() raise end
- assert_equal 80, app.terminal_width
+ assert_equal 80, @app.terminal_width
end
def test_no_rakeopt