Skip to content

Commit

Permalink
Adjust imports and do some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
icy-arctic-fox committed Jul 27, 2024
1 parent 871a508 commit a291482
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/spectator/core/configuration.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "../formatters/dots_formatter"
require "../formatters/*"
require "./hooks"
require "./sandbox"

Expand Down
4 changes: 2 additions & 2 deletions src/spectator/core/context_hook.cr
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ module Spectator::Core
io << "#<" << self.class << ' '

case @position
in Position::Before then io << "before context"
in Position::After then io << "after context"
in .before? then io << "before context"
in .after? then io << "after context"
end

if location = @location
Expand Down
1 change: 0 additions & 1 deletion src/spectator/core/example.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "./item"
require "./location_range"
require "./result"

module Spectator::Core
Expand Down
6 changes: 3 additions & 3 deletions src/spectator/core/example_hook.cr
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ module Spectator::Core
io << "#<" << self.class << ' '

case @position
in Position::Before then io << "before example"
in Position::After then io << "after example"
in Position::Around then io << "around example"
in .before? then io << "before example"
in .after? then io << "after example"
in .around? then io << "around example"
end

if location = @location
Expand Down
2 changes: 2 additions & 0 deletions src/spectator/core/location_range.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require "./location"

module Spectator::Core
# Information about a range in the source code.
struct LocationRange
Expand Down
1 change: 1 addition & 0 deletions src/spectator/formatters/common_text_output.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "../assertion_failed"
require "../core/execution_result"
require "../core/source_cache"

Expand Down
1 change: 1 addition & 0 deletions src/spectator/formatters/junit/test_case.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "../../assertion_failed"
require "./xml_element"

module Spectator::Formatters::JUnit
Expand Down
2 changes: 0 additions & 2 deletions src/spectator/matchers/custom.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "./matcher"

module Spectator::Matchers
module CustomDSL
macro match(*, block = false, &impl)
Expand Down
1 change: 0 additions & 1 deletion src/spectator/matchers/expect.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require "../assertion_failed"
require "../core/location_range"
require "./matcher"

Expand Down
4 changes: 4 additions & 0 deletions src/spectator/matchers/matcher.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
require "../assertion_failed"
require "../core/location_range"
require "../framework_error"

module Spectator::Matchers
module Matcher
abstract def matches?(actual_value) : Bool
Expand Down
2 changes: 2 additions & 0 deletions src/spectator/matchers/negated.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require "../framework_error"

module Spectator::Matchers
struct NegatedMatcher(T)
def initialize(@matcher : T)
Expand Down
1 change: 1 addition & 0 deletions src/spectator/matchers/should_methods.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "../core/location_range"
require "./matcher"

module Spectator::Matchers
Expand Down

0 comments on commit a291482

Please sign in to comment.