Sha256: b9822aab6fe2eee3ff9027d9e60776a1cb1a612dc24bc101f25217c6936b188b
Contents?: true
Size: 784 Bytes
Versions: 16
Compression:
Stored size: 784 Bytes
Contents
require 'spec_helper' describe Localeapp::CLI::Add, "#execute(current_name, new_name, *rest)" do def do_action(current_name = 'test.key', new_name = 'test.new_name') @command.execute(current_name, new_name) end before(:each) do @output = StringIO.new @command = Localeapp::CLI::Rename.new(:output => @output) end it "makes the api call to the translations endpoint with the new name as the post body" do with_configuration do @command.should_receive(:api_call).with( :rename, :url_options => { :current_name => 'test.key' }, :payload => { :new_name => 'test.new_name' }, :success => :report_success, :failure => :report_failure, :max_connection_attempts => 3 ) do_action end end end
Version data entries
16 entries across 16 versions & 1 rubygems