Sha256: c19ffe489ca9755e400db9492cb933426e5065598745309830d846acd81e5e35

Contents?: true

Size: 520 Bytes

Versions: 14

Compression:

Stored size: 520 Bytes

Contents

RSpec.describe Mutant::AST::Meta::Optarg do
  subject(:object) { described_class.new(node) }

  let(:node)  { s(:optarg, name, value) }
  let(:name)  { :foo                    }
  let(:value) { s(:sym, :bar)           }

  its(:name) { should be(:foo) }
  its(:default_value) { should eql(s(:sym, :bar)) }

  describe '#used?' do
    subject { object.used? }

    it { should be true }

    context 'when name is prefixed with an underscore' do
      let(:name) { :_foo }
      it { should be false }
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mutant-0.8.16 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.15 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.14 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.13 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.12 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.11 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.10 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.9 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.8 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.7 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.6 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.5 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.4 spec/unit/mutant/ast/meta/optarg_spec.rb
mutant-0.8.3 spec/unit/mutant/ast/meta/optarg_spec.rb