spec/config_spec.rb in chatterbot-0.2.7 vs spec/config_spec.rb in chatterbot-0.2.8
- old
+ new
@@ -5,9 +5,15 @@
before(:each) do
@bot = Chatterbot::Bot.new
end
describe "loading" do
+ it "overrides with incoming params" do
+ @bot.should_receive(:global_config).and_return({:foo => :bar})
+ tmp = @bot.load_config({:foo => :baz})
+ tmp[:foo].should == :baz
+ end
+
it "loads config when we need a variable" do
@bot.should_receive(:load_config).and_return({:foo => :bar})
@bot.config = nil
@bot.config[:foo].should == :bar