Move PassingExample to its own file

Missed this one when moving code around before.
This commit is contained in:
Michael Miller 2018-11-14 12:55:21 -07:00
parent f0204a32ea
commit 4a531bd83f
2 changed files with 23 additions and 24 deletions

View file

@ -0,0 +1,23 @@
# Example that always succeeds.
class PassingExample < Spectator::RunnableExample
# Dummy description.
def what
"PASS"
end
# Run the example that always passes.
# If this doesn't something broke.
private def run_instance
report_expectations(1, 0)
end
# Creates a passing example.
def self.create
hooks = Spectator::ExampleHooks.empty
group = Spectator::RootExampleGroup.new(hooks)
values = Spectator::Internals::SampleValues.empty
new(group, values).tap do |example|
group.children = [example.as(Spectator::ExampleComponent)]
end
end
end

View file

@ -10,27 +10,3 @@ class SpySUT
true true
end end
end end
# Example that always succeeds.
class PassingExample < Spectator::RunnableExample
# Dummy description.
def what
"PASS"
end
# Run the example that always passes.
# If this doesn't something broke.
private def run_instance
report_expectations(1, 0)
end
# Creates a passing example.
def self.create
hooks = Spectator::ExampleHooks.empty
group = Spectator::RootExampleGroup.new(hooks)
values = Spectator::Internals::SampleValues.empty
new(group, values).tap do |example|
group.children = [example.as(Spectator::ExampleComponent)]
end
end
end