1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Run test in an object of its own

Otherwise we are sharing state with the toplevel binding,
which allows other tests to modify its values causing this to fail
e.g. https://travis-ci.org/pry/pry/jobs/32184681
This commit is contained in:
Josh Cheek 2014-08-10 18:28:44 -06:00
parent 144d32e1d6
commit 990d3e8062

View file

@ -111,8 +111,8 @@ describe "ls" do
end
describe 'with -l' do
it 'should find locals and sort by descending size' do
result = pry_eval("aa = 'asdf'; bb = 'xyz'", 'ls -l')
focus 'should find locals and sort by descending size' do
result = pry_eval(Object.new, "aa = 'asdf'; bb = 'xyz'", 'ls -l')
result.should_not =~ /=>/
result.should_not =~ /0x\d{5}/
result.should =~ /asdf.*xyz/m