spec/trema/echo-reply_spec.rb in trema-0.4.6 vs spec/trema/echo-reply_spec.rb in trema-0.4.7

- old
+ new

@@ -14,66 +14,66 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -require File.join( File.dirname( __FILE__ ), "..", "spec_helper" ) -require "trema" +require File.join(File.dirname(__FILE__), '..', 'spec_helper') +require 'trema' module Trema - describe EchoReply, ".new" do - it_should_behave_like "any Openflow message with default transaction ID" - its( :user_data ) { should be_nil } + describe EchoReply, '.new' do + it_should_behave_like 'any Openflow message with default transaction ID' + its(:user_data) { should be_nil } end - describe EchoReply, ".new(nil)" do - subject { EchoReply.new( nil ) } - it_should_behave_like "any Openflow message with default transaction ID" - its( :user_data ) { should be_nil } + describe EchoReply, '.new(nil)' do + subject { EchoReply.new(nil) } + it_should_behave_like 'any Openflow message with default transaction ID' + its(:user_data) { should be_nil } end - describe EchoReply, ".new(transaction_id)" do - subject { EchoReply.new( transaction_id ) } - it_should_behave_like "any Openflow message with transaction ID" + describe EchoReply, '.new(transaction_id)' do + subject { EchoReply.new(transaction_id) } + it_should_behave_like 'any Openflow message with transaction ID' end - describe EchoReply, ".new(:transaction_id => value)" do - subject { EchoReply.new( :transaction_id => transaction_id ) } - it_should_behave_like "any Openflow message with transaction ID" + describe EchoReply, '.new(:transaction_id => value)' do + subject { EchoReply.new(:transaction_id => transaction_id) } + it_should_behave_like 'any Openflow message with transaction ID' end - describe EchoReply, ".new(:xid => value)" do - subject { EchoReply.new( :xid => xid ) } - it_should_behave_like "any Openflow message with xid" + describe EchoReply, '.new(:xid => value)' do + subject { EchoReply.new(:xid => xid) } + it_should_behave_like 'any Openflow message with xid' end - describe EchoReply, ".new(:user_data => value)" do - subject { EchoReply.new( :user_data => user_data ) } - it_should_behave_like "any Openflow message with user_data" + describe EchoReply, '.new(:user_data => value)' do + subject { EchoReply.new(:user_data => user_data) } + it_should_behave_like 'any Openflow message with user_data' end - describe EchoReply, ".new(:transaction_id => value, :user_data => value)" do - subject { EchoReply.new( :transaction_id => transaction_id, :user_data => user_data ) } + describe EchoReply, '.new(:transaction_id => value, :user_data => value)' do + subject { EchoReply.new(:transaction_id => transaction_id, :user_data => user_data) } context 'transaction_id: 123, user_data: "USER DATA"' do - let( :transaction_id ) { 123 } - let( :user_data ) { "USER DATA" } - its( :transaction_id ) { should == 123 } - its( :xid ) { should == 123 } - its( :user_data ) { should == "USER DATA" } + let(:transaction_id) { 123 } + let(:user_data) { 'USER DATA' } + its(:transaction_id) { should == 123 } + its(:xid) { should == 123 } + its(:user_data) { should == 'USER DATA' } end end describe EchoReply, '.new("INVALID OPTION")' do - it { expect { EchoReply.new "INVALID OPTION" }.to raise_error( TypeError ) } + it { expect { EchoReply.new 'INVALID OPTION' }.to raise_error(TypeError) } end end ### Local variables: