Sha256: 2bedfff3dba9cb92c1c5e69ebbdc0c92082900126ca9e3f45474f7dd52c07029
Contents?: true
Size: 727 Bytes
Versions: 2
Compression:
Stored size: 727 Bytes
Contents
require 'spec_helper' require 'ostruct' describe Thunderer::Parser do let(:object) { OpenStruct.new(first: 1, second: 2) } describe '#interpolate_channel' do subject { Thunderer::Parser.interpolate_channel(channel, object) } context 'when channel have no interpolation' do let(:channel) { 'without interpolation string' } it { should == channel } end context 'when channel have one interpolation sequence' do let(:channel) { '/hello/:first' } it { should include('1') } end context 'when channel have two interpolations' do let(:channel) { '/hello/:first/world/:second' } it { should include('1') } it { should include('2') } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
thunderer-0.9.1 | spec/thunderer/parser_spec.rb |
thunderer-0.9.0 | spec/thunderer/parser_spec.rb |