Skip to content

Commit

Permalink
test(amazing/awesome_print): make spec stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
marian13 committed Jun 8, 2024
1 parent 86e41bf commit 9f5dadb
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def self.name

let(:step) { container.new.steps.first }

let(:keywords) { ["ConvenientService", "entity", "Step", "container", "ContainerService", "service", "StepService"] }
let(:keywords) { ["ConvenientService", ":entity", "Step", ":container", "ContainerService", ":service", "StepService"] }

it "returns `inspect` representation of step" do
expect(step.inspect).to include(*keywords)
Expand All @@ -83,7 +83,7 @@ def self.name
end
end

let(:keywords) { ["ConvenientService", "entity", "Step", "container", "ContainerService", "method", ":result"] }
let(:keywords) { ["ConvenientService", ":entity", "Step", ":container", "ContainerService", ":method", ":result"] }

it "returns `inspect` representation of step" do
expect(step.inspect).to include(*keywords)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def self.name

let(:step) { container.new.steps.first }

let(:keywords) { ["ConvenientService", "entity", "Step", "container", "ContainerService", "service", "StepService"] }
let(:keywords) { ["ConvenientService", ":entity", "Step", ":container", "ContainerService", ":service", "StepService"] }

it "returns `inspect` representation of step" do
expect(step.inspect).to include(*keywords)
Expand All @@ -83,7 +83,7 @@ def self.name
end
end

let(:keywords) { ["ConvenientService", "entity", "Step", "container", "ContainerService", "method", ":result"] }
let(:keywords) { ["ConvenientService", ":entity", "Step", ":container", "ContainerService", ":method", ":result"] }

it "returns `inspect` representation of step" do
expect(step.inspect).to include(*keywords)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def self.name

let(:service_instance) { service_class.new }
let(:inspect_values) { {name: service_class.name} }
let(:keywords) { ["ConvenientService", "entity", "Service", "name", "ImportantService"] }
let(:keywords) { ["ConvenientService", ":entity", "Service", ":name", "ImportantService"] }

describe "#inspect" do
it "returns `inspect` representation of service" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def self.name

let(:service_instance) { service_class.new }
let(:inspect_values) { {name: service_class.name} }
let(:keywords) { ["ConvenientService", "entity", "Service", "name", "ImportantService"] }
let(:keywords) { ["ConvenientService", ":entity", "Service", ":name", "ImportantService"] }

describe "#inspect" do
it "returns `inspect` representation of service" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def result

let(:result) { service.result }

let(:keywords) { ["ConvenientService", "entity", "Result", "service", "ImportantService", "status", ":success"] }
let(:keywords) { ["ConvenientService", ":entity", "Result", ":service", "ImportantService", ":status", ":success"] }

it "returns `inspect` representation of result" do
expect(result.inspect).to include(*keywords)
Expand Down Expand Up @@ -83,7 +83,7 @@ def result
end
end

let(:keywords) { ["ConvenientService", "entity", "Result", "service", "ImportantService", "status", ":success", "data_keys", "foo"] }
let(:keywords) { ["ConvenientService", ":entity", "Result", ":service", "ImportantService", ":status", ":success", ":data_keys", "foo"] }

it "includes data keys into `inspect` representation of result" do
expect(result.inspect).to include(*keywords)
Expand All @@ -106,7 +106,7 @@ def result
end
end

let(:keywords) { ["ConvenientService", "entity", "Result", "service", "ImportantService", "status", ":success", "data_keys", "foo", "baz", "quux"] }
let(:keywords) { ["ConvenientService", ":entity", "Result", ":service", "ImportantService", ":status", ":success", ":data_keys", "foo", "baz", "quux"] }

it "delegates to `data.keys.inspect`" do
expect(result.inspect).to include(*keywords)
Expand All @@ -131,7 +131,7 @@ def result
end
end

let(:keywords) { ["ConvenientService", "entity", "Result", "service", "ImportantService", "status", ":error", "message", "foo"] }
let(:keywords) { ["ConvenientService", ":entity", "Result", ":service", "ImportantService", ":status", ":error", ":message", "foo"] }

it "includes message into `inspect` representation of result" do
expect(result.inspect).to include(*keywords)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def result

let(:result) { service.result }

let(:keywords) { ["ConvenientService", "entity", "Result", "service", "ImportantService", "status", ":success"] }
let(:keywords) { ["ConvenientService", ":entity", "Result", ":service", "ImportantService", ":status", ":success"] }

it "returns `inspect` representation of result" do
expect(result.inspect).to include(*keywords)
Expand Down Expand Up @@ -83,7 +83,7 @@ def result
end
end

let(:keywords) { ["ConvenientService", "entity", "Result", "service", "ImportantService", "status", ":success", "data_keys", "foo"] }
let(:keywords) { ["ConvenientService", ":entity", "Result", ":service", "ImportantService", ":status", ":success", ":data_keys", "foo"] }

it "includes data keys into `inspect` representation of result" do
expect(result.inspect).to include(*keywords)
Expand All @@ -106,7 +106,7 @@ def result
end
end

let(:keywords) { ["ConvenientService", "entity", "Result", "service", "ImportantService", "status", ":success", "data_keys", "foo", "baz", "quux"] }
let(:keywords) { ["ConvenientService", ":entity", "Result", ":service", "ImportantService", ":status", ":success", ":data_keys", "foo", "baz", "quux"] }

it "delegates to `data.keys.inspect`" do
expect(result.inspect).to include(*keywords)
Expand All @@ -131,7 +131,7 @@ def result
end
end

let(:keywords) { ["ConvenientService", "entity", "Result", "service", "ImportantService", "status", ":error", "message", "foo"] }
let(:keywords) { ["ConvenientService", ":entity", "Result", ":service", "ImportantService", ":status", ":error", ":message", "foo"] }

it "includes message into `inspect` representation of result" do
expect(result.inspect).to include(*keywords)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def result

let(:code) { service.result.code }

let(:keywords) { ["ConvenientService", "entity", "Code", "result", code.result.class.name, "value", ":foo"] }
let(:keywords) { ["ConvenientService", ":entity", "Code", ":result", code.result.class.name, ":value", ":foo"] }

before do
##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def result

let(:code) { service.result.code }

let(:keywords) { ["ConvenientService", "entity", "Code", "result", code.result.class.name, "value", ":foo"] }
let(:keywords) { ["ConvenientService", ":entity", "Code", ":result", code.result.class.name, ":value", ":foo"] }

before do
##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def result

let(:data) { service.result.data }

let(:keywords) { ["ConvenientService", "entity", "Data", "result", data.result.class.name, "values", ":foo", "bar"] }
let(:keywords) { ["ConvenientService", ":entity", "Data", ":result", data.result.class.name, ":values", ":foo", "bar"] }

before do
##
Expand Down Expand Up @@ -80,7 +80,7 @@ def result
end
end

let(:keywords) { ["ConvenientService", "entity", "Data", "result", data.result.class.name, "values", "{}"] }
let(:keywords) { ["ConvenientService", ":entity", "Data", ":result", data.result.class.name, ":values", "{}"] }

it "returns `inspect` representation of data" do
expect(data.inspect).to include(*keywords)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def result

let(:data) { service.result.data }

let(:keywords) { ["ConvenientService", "entity", "Data", "result", data.result.class.name, "values", ":foo", "bar"] }
let(:keywords) { ["ConvenientService", ":entity", "Data", ":result", data.result.class.name, ":values", ":foo", "bar"] }

before do
##
Expand Down Expand Up @@ -80,7 +80,7 @@ def result
end
end

let(:keywords) { ["ConvenientService", "entity", "Data", "result", data.result.class.name, "values", "{}"] }
let(:keywords) { ["ConvenientService", ":entity", "Data", ":result", data.result.class.name, ":values", "{}"] }

it "returns `inspect` representation of data" do
expect(data.inspect).to include(*keywords)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def result

let(:message) { service.result.message }

let(:keywords) { ["ConvenientService", "entity", "Message", "result", message.result.class.name, "text", "foo"] }
let(:keywords) { ["ConvenientService", ":entity", "Message", ":result", message.result.class.name, ":text", "foo"] }

before do
##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def result

let(:message) { service.result.message }

let(:keywords) { ["ConvenientService", "entity", "Message", "result", message.result.class.name, "text", "foo"] }
let(:keywords) { ["ConvenientService", ":entity", "Message", ":result", message.result.class.name, ":text", "foo"] }

before do
##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def result

let(:status) { service.result.status }

let(:keywords) { ["ConvenientService", "entity", "Status", "result", status.result.class.name, "type", ":success"] }
let(:keywords) { ["ConvenientService", ":entity", "Status", ":result", status.result.class.name, ":type", ":success"] }

before do
##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def result

let(:status) { service.result.status }

let(:keywords) { ["ConvenientService", "entity", "Status", "result", status.result.class.name, "type", ":success"] }
let(:keywords) { ["ConvenientService", ":entity", "Status", ":result", status.result.class.name, ":type", ":success"] }

before do
##
Expand Down

0 comments on commit 9f5dadb

Please sign in to comment.