Skip to content

Commit

Permalink
Update tests to use latest version of minitest
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Jun 12, 2013
1 parent b418e06 commit 74f1a73
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gem 'rake'

group :test do
gem 'coveralls', :require => false
gem 'minitest'
gem 'minitest', '>= 5'
gem 'rr', '>= 1.1'
gem 'simplecov', :require => false
end
Expand Down
6 changes: 3 additions & 3 deletions test/account_information_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/test_helper'

class Twurl::AccountInformationController::DispatchWithNoAuthorizedAccountsTest < MiniTest::Unit::TestCase
class Twurl::AccountInformationController::DispatchWithNoAuthorizedAccountsTest < Minitest::Test
attr_reader :options, :client, :controller
def setup
@options = Twurl::Options.new
Expand All @@ -16,7 +16,7 @@ def test_message_indicates_when_no_accounts_are_authorized
end
end

class Twurl::AccountInformationController::DispatchWithOneAuthorizedAccountTest < MiniTest::Unit::TestCase
class Twurl::AccountInformationController::DispatchWithOneAuthorizedAccountTest < Minitest::Test
attr_reader :options, :client, :controller
def setup
@options = Twurl::Options.test_exemplar
Expand All @@ -34,7 +34,7 @@ def test_authorized_account_is_displayed_and_marked_as_the_default
end
end

class Twurl::AccountInformationController::DispatchWithOneUsernameThatHasAuthorizedMultipleAccountsTest < MiniTest::Unit::TestCase
class Twurl::AccountInformationController::DispatchWithOneUsernameThatHasAuthorizedMultipleAccountsTest < Minitest::Test
attr_reader :default_client_options, :default_client, :other_client_options, :other_client, :controller
def setup
@default_client_options = Twurl::Options.test_exemplar
Expand Down
2 changes: 1 addition & 1 deletion test/alias_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/test_helper'

class Twurl::AliasesController::DispatchTest < MiniTest::Unit::TestCase
class Twurl::AliasesController::DispatchTest < Minitest::Test
attr_reader :options, :client
def setup
@options = Twurl::Options.test_exemplar
Expand Down
2 changes: 1 addition & 1 deletion test/authorization_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/test_helper'

class Twurl::AuthorizationController::DispatchTest < MiniTest::Unit::TestCase
class Twurl::AuthorizationController::DispatchTest < Minitest::Test
attr_reader :options, :client, :controller
def setup
@options = Twurl::Options.new
Expand Down
2 changes: 1 addition & 1 deletion test/cli_options_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/test_helper'

class Twurl::Options::Test < MiniTest::Unit::TestCase
class Twurl::Options::Test < Minitest::Test
attr_reader :options
def setup
@options = Twurl::Options.new
Expand Down
2 changes: 1 addition & 1 deletion test/cli_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/test_helper'

class Twurl::CLI::OptionParsingTest < MiniTest::Unit::TestCase
class Twurl::CLI::OptionParsingTest < Minitest::Test
module CommandParsingTests
def test_no_command_specified_falls_to_default_command
options = Twurl::CLI.parse_options(['/1.1/url/does/not/matter.json'])
Expand Down
4 changes: 2 additions & 2 deletions test/configuration_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/test_helper'

class Twurl::ConfigurationController::DispatchTest < MiniTest::Unit::TestCase
class Twurl::ConfigurationController::DispatchTest < Minitest::Test
def test_error_message_is_displayed_if_setting_is_unrecognized
options = Twurl::Options.test_exemplar
client = Twurl::OAuthClient.test_exemplar
Expand All @@ -15,7 +15,7 @@ def test_error_message_is_displayed_if_setting_is_unrecognized
end
end

class Twurl::ConfigurationController::DispatchDefaultSettingTest < MiniTest::Unit::TestCase
class Twurl::ConfigurationController::DispatchDefaultSettingTest < Minitest::Test
def test_setting_default_profile_just_by_username
options = Twurl::Options.test_exemplar
client = Twurl::OAuthClient.test_exemplar
Expand Down
2 changes: 1 addition & 1 deletion test/oauth_client_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/test_helper'

class Twurl::OAuthClient::AbstractOAuthClientTest < MiniTest::Unit::TestCase
class Twurl::OAuthClient::AbstractOAuthClientTest < Minitest::Test
attr_reader :client, :options
def setup
Twurl::OAuthClient.instance_variable_set(:@rcfile, nil)
Expand Down
12 changes: 6 additions & 6 deletions test/rcfile_test.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
require File.dirname(__FILE__) + '/test_helper'

class Twurl::RCFile::PathConstructionTest < MiniTest::Unit::TestCase
class Twurl::RCFile::PathConstructionTest < Minitest::Test
def test_file_path_appends_file_to_directory
assert_equal File.join(Twurl::RCFile.directory, Twurl::RCFile::FILE), Twurl::RCFile.file_path
end
end

class Twurl::RCFile::LoadingTest < MiniTest::Unit::TestCase
class Twurl::RCFile::LoadingTest < Minitest::Test
def test_load_parses_and_loads_file_if_it_exists
mock(YAML).load_file(Twurl::RCFile.file_path).times(1)
mock(Twurl::RCFile).default_rcfile_structure.never
Expand All @@ -22,7 +22,7 @@ def test_load_returns_default_file_structure_if_file_does_not_exist
end
end

class Twurl::RCFile::InitializationTest < MiniTest::Unit::TestCase
class Twurl::RCFile::InitializationTest < Minitest::Test
def test_initializing_when_the_file_does_not_exist_loads_default_rcfile_structure
mock(YAML).load_file(Twurl::RCFile.file_path) { raise Errno::ENOENT }.times(1)

Expand All @@ -40,7 +40,7 @@ def test_initializing_when_the_file_does_exists_loads_content_of_file
end
end

class Twurl::RCFile::DefaultProfileFromDefaultRCFileTest < MiniTest::Unit::TestCase
class Twurl::RCFile::DefaultProfileFromDefaultRCFileTest < Minitest::Test
attr_reader :rcfile
def setup
mock(YAML).load_file(Twurl::RCFile.file_path) { raise Errno::ENOENT }.times(1)
Expand All @@ -66,7 +66,7 @@ def test_setting_default_profile
end
end

class Twurl::RCFile::UpdatingTest < MiniTest::Unit::TestCase
class Twurl::RCFile::UpdatingTest < Minitest::Test
attr_reader :rcfile
def setup
mock(YAML).load_file(Twurl::RCFile.file_path) { raise Errno::ENOENT }.times(1)
Expand Down Expand Up @@ -108,7 +108,7 @@ def test_adding_additional_clients_does_not_change_default_profile
end
end

class Twurl::RCFile::SavingTest < MiniTest::Unit::TestCase
class Twurl::RCFile::SavingTest < Minitest::Test
attr_reader :rcfile
def setup
delete_rcfile
Expand Down
2 changes: 1 addition & 1 deletion test/request_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/test_helper'

class Twurl::RequestController::AbstractTestCase < MiniTest::Unit::TestCase
class Twurl::RequestController::AbstractTestCase < Minitest::Test
attr_reader :options, :client, :controller
def setup
Twurl::CLI.output = StringIO.new
Expand Down

0 comments on commit 74f1a73

Please sign in to comment.