This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Describe.new NumberService do | |
# something | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def describe(context_name, &block) | |
Describe.new(context_name, &block) | |
end | |
describe NumberService do | |
# check something | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Describe | |
attr_reader :context_name | |
def initialize(context_name, &block) | |
@context_name = context_name | |
instance_eval &block | |
end | |
def describe(context_name, &block) | |
Describe.new(context_name, &block) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Describe | |
attr_reader :context_name | |
def initialize(context_name, &block) | |
@context_name = context_name | |
instance_eval &block | |
end | |
def describe(context_name, &block) | |
Describe.new(context_name, &block) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Example | |
attr_reader :context_name | |
def initialize(context_name, &block) | |
@context_name = context_name | |
instance_eval &block | |
end | |
def expect(result) | |
self |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Example | |
attr_reader :context_name | |
def initialize(context_name, &block) | |
@context_name = context_name | |
instance_eval &block | |
end | |
def expect(result) | |
@result = result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Example | |
attr_reader :context_name | |
def initialize(context_name, &block) | |
@context_name = context_name | |
instance_eval &block | |
end | |
def expect(result) | |
@result = result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Example | |
attr_reader :context_name | |
def initialize(context_name, &block) | |
@context_name = context_name | |
instance_eval &block | |
end | |
def expect(result) | |
@result = result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Example | |
attr_reader :context_name, :test_result | |
def initialize(context_name, &block) | |
@context_name = context_name | |
instance_eval &block | |
end | |
def expect(result) | |
@result = result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Describe | |
attr_reader :context_name, :examples | |
def initialize(context_name, &block) | |
@context_name = context_name | |
@describes = [] | |
@examples = [] | |
instance_eval &block | |
end |