require 'rspec_ext' require "#{__FILE__.dirname}/helper" describe "ScopedParams" do it "basic" do workspace = { :params => {"book[title]" => "Super Hero"} }.to_openobject @processor = Crystal::Processors::ScopedParams.new(lambda{}) @processor.stub(:workspace).and_return(workspace) @processor.call workspace.params.should == { "book" => {"title" => "Super Hero"} } end end