mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
reference bug # in spec.
This commit is contained in:
parent
39bbfa9e63
commit
41d8e86dc2
1 changed files with 8 additions and 9 deletions
|
@ -1,5 +1,13 @@
|
|||
require_relative 'helper'
|
||||
describe Pry::Config do
|
||||
describe "bug #1277" do
|
||||
specify "a local key has precendence over a inherited method of the same name" do
|
||||
local = Pry::Config.from_hash(output: 'foobar')
|
||||
local.extend Module.new { def output(); 'broken'; end }
|
||||
expect(local.output).to eq('foobar')
|
||||
end
|
||||
end
|
||||
|
||||
describe "reserved keys" do
|
||||
it "raises Pry::Config::ReservedKeyError on assignment of a reserved key" do
|
||||
local = Pry::Config.new
|
||||
|
@ -38,15 +46,6 @@ describe Pry::Config do
|
|||
end
|
||||
end
|
||||
|
||||
describe "collision" do
|
||||
# Testcase GH-1277
|
||||
it "doesn't collide" do
|
||||
local = Pry::Config.from_hash(output: 'foobar')
|
||||
local.extend Module.new { def output(); 'broken'; end }
|
||||
expect(local.output).to eq('foobar')
|
||||
end
|
||||
end
|
||||
|
||||
describe ".from_hash" do
|
||||
it "returns an object without a default" do
|
||||
local = Pry::Config.from_hash({})
|
||||
|
|
Loading…
Add table
Reference in a new issue