Skip to content

Commit

Permalink
Clean up some describes names:
Browse files Browse the repository at this point in the history
  - there were describes referring to methods that no longer exist
    (I remember them from micronaut days)
  - there were describes just duplicating the full metadata hash - why?
  - preferring more 'abstract' describe names tends to be a little
    more resilient over time as the implementation gets renamed or
    changed over time
  • Loading branch information
rsanheim authored and dchelimsky committed Mar 19, 2010
1 parent bb574fe commit 779d64c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec/rspec/core/metadata_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Rspec
module Core
describe Metadata do

describe "#process" do
describe "process" do
Metadata::RESERVED_KEYS.each do |key|
it "prohibits :#{key} as a hash key" do
m = Metadata.new
Expand All @@ -15,7 +15,7 @@ module Core
end
end

describe "[:description]" do
describe "description" do
it "just has the example description" do
m = Metadata.new
m.process('group')
Expand All @@ -25,7 +25,7 @@ module Core
end
end

describe "[:full_description]" do
describe "full description" do
it "concats the example group name and description" do
m = Metadata.new
m.process('group')
Expand All @@ -35,7 +35,7 @@ module Core
end
end

describe "[:example_group][:description]" do
describe "description" do
context "with a string" do
it "provides the submitted description" do
m = Metadata.new
Expand Down Expand Up @@ -64,7 +64,7 @@ module Core
end
end

describe "[:example_group][:full_description]" do
describe "full description" do
it "concats the nested example group descriptions" do
parent = Metadata.new
parent.process(Object, 'parent')
Expand All @@ -76,7 +76,7 @@ module Core
end
end

describe "#determine_file_path" do
describe "file path" do
it "finds the first spec file in the caller array" do
m = Metadata.new
m.process(:caller => [
Expand All @@ -89,7 +89,7 @@ module Core
end
end

describe "#determine_line_number" do
describe "line number" do
it "finds the line number with the first spec file " do
m = Metadata.new
m.process(:caller => [
Expand All @@ -112,7 +112,7 @@ module Core
end
end

describe "#metadata_for_example" do
describe "metadata for example" do
let(:caller_for_example) { caller(0) }
let(:line_number) { __LINE__ - 1 }
let(:metadata) { Metadata.new.process("group description") }
Expand Down Expand Up @@ -151,7 +151,7 @@ module Core
end
end

describe "#apply_condition" do
describe "apply_condition" do
let(:group_metadata) { Metadata.new.process('group', :caller => ["foo_spec.rb:#{__LINE__}"]) }
let(:group_line_number) { __LINE__ -1 }
let(:example_metadata) { group_metadata.for_example('example', :caller => ["foo_spec.rb:#{__LINE__}"]) }
Expand Down

0 comments on commit 779d64c

Please sign in to comment.