mirror of
https://github.com/ms-ati/docile
synced 2023-03-27 23:21:52 -04:00
Add pending spec for Docile#dsl_eval_immutable
This commit is contained in:
parent
be9d29a907
commit
cb6e5bbe65
1 changed files with 24 additions and 0 deletions
|
@ -246,6 +246,30 @@ describe Docile do
|
|||
|
||||
end
|
||||
|
||||
describe "#dsl_eval_immutable" do
|
||||
|
||||
context "when DSL context object is a String" do
|
||||
let(:original) { "Hello, world!" }
|
||||
let!(:result) { execute_non_mutating_dsl_against_string }
|
||||
|
||||
def execute_non_mutating_dsl_against_string
|
||||
Docile.dsl_eval_immutable(original) do
|
||||
reverse
|
||||
upcase
|
||||
end
|
||||
end
|
||||
|
||||
pending "doesn't modify the original string" do
|
||||
original.should == "Hello, world!"
|
||||
end
|
||||
|
||||
pending "chains the commands in the block against the DSL context object" do
|
||||
result.should == "!DLROW ,OLLEH"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe Docile::FallbackContextProxy do
|
||||
|
|
Loading…
Reference in a new issue