mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-23 18:50:12 +01:00
switch to minitest from test/unit
not sure if this is the right change, but tests seem to run
This commit is contained in:
parent
128da07fc2
commit
35cab99cea
8 changed files with 7 additions and 9 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
ENV["RAILS_ENV"] ||= "test"
|
ENV["RAILS_ENV"] ||= "test"
|
||||||
require 'test/unit'
|
|
||||||
require 'mocha/setup'
|
require 'mocha/setup'
|
||||||
|
|
||||||
$:.unshift File.dirname(File.dirname(__FILE__))
|
$:.unshift File.dirname(File.dirname(__FILE__))
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../minimal_test_helper')
|
||||||
require 'app/models/stats/pie_chart_data'
|
require 'app/models/stats/pie_chart_data'
|
||||||
require 'active_support/core_ext/string'
|
require 'active_support/core_ext/string'
|
||||||
|
|
||||||
class Stats::PieChartDataTest < Test::Unit::TestCase
|
class Stats::PieChartDataTest < Minitest::Test
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
xx = { :stats => { :other_actions_label => '(other)' } }
|
xx = { :stats => { :other_actions_label => '(other)' } }
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
require 'date'
|
require 'date'
|
||||||
require 'test/unit'
|
|
||||||
require 'active_support/core_ext/object/blank'
|
require 'active_support/core_ext/object/blank'
|
||||||
require_relative '../../app/services/rich_message_extractor.rb'
|
require_relative '../../app/services/rich_message_extractor.rb'
|
||||||
|
|
||||||
class RichMessageExtractorTest < Test::Unit::TestCase
|
class RichMessageExtractorTest < Minitest::Test
|
||||||
|
|
||||||
def test_message_with_all_options
|
def test_message_with_all_options
|
||||||
message = "ohai@some-context~this-project>131012<131014#tag1#tag2*"
|
message = "ohai@some-context~this-project>131012<131014#tag1#tag2*"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ require_relative '../../lib/staleness'
|
||||||
require_relative '../../lib/user_time'
|
require_relative '../../lib/user_time'
|
||||||
require 'timecop'
|
require 'timecop'
|
||||||
|
|
||||||
class StalenessTest < Test::Unit::TestCase
|
class StalenessTest < Minitest::Test
|
||||||
FakePrefs = Struct.new(:time_zone)
|
FakePrefs = Struct.new(:time_zone)
|
||||||
FakeUser = Struct.new(:time) do
|
FakeUser = Struct.new(:time) do
|
||||||
def prefs
|
def prefs
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../minimal_test_helper')
|
require File.expand_path(File.dirname(__FILE__) + '/../minimal_test_helper')
|
||||||
require 'app/models/stats/tag_cloud'
|
require 'app/models/stats/tag_cloud'
|
||||||
|
|
||||||
class TagCloudTest < Test::Unit::TestCase
|
class TagCloudTest < Minitest::Test
|
||||||
|
|
||||||
FakeTag = Struct.new(:name, :count)
|
FakeTag = Struct.new(:name, :count)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ require 'app/models/stats/time_to_complete'
|
||||||
|
|
||||||
FakeTask = Struct.new(:created_at, :completed_at)
|
FakeTask = Struct.new(:created_at, :completed_at)
|
||||||
|
|
||||||
class TimeToCompleteTest < Test::Unit::TestCase
|
class TimeToCompleteTest < Minitest::Test
|
||||||
|
|
||||||
def now
|
def now
|
||||||
@now ||= Time.utc(2013, 1, 2, 3, 4, 5)
|
@now ||= Time.utc(2013, 1, 2, 3, 4, 5)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ require './doc/tracks_cli/tracks_api'
|
||||||
|
|
||||||
module TracksCli
|
module TracksCli
|
||||||
|
|
||||||
class TracksApiTest < Test::Unit::TestCase
|
class TracksApiTest < Minitest::Test
|
||||||
|
|
||||||
def test_https_detection
|
def test_https_detection
|
||||||
uri = URI.parse("https://tracks.example.com")
|
uri = URI.parse("https://tracks.example.com")
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ require 'active_support/time_with_zone'
|
||||||
|
|
||||||
module TracksCli
|
module TracksCli
|
||||||
|
|
||||||
class TracksXmlBuilderTest < Test::Unit::TestCase
|
class TracksXmlBuilderTest < Minitest::Test
|
||||||
def test_all
|
def test_all
|
||||||
todo = {
|
todo = {
|
||||||
description: "test action",
|
description: "test action",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue