Sha256: 4c48237e4302b355af9499861bfff26d26b315b0512be68b8ca833bd270ef47d

Contents?: true

Size: 902 Bytes

Versions: 2

Compression:

Stored size: 902 Bytes

Contents

require_relative './spec_helper'

require 'norikra/target'
# require 'norikra/error'

describe Norikra::Target do
  describe '.valid?' do
    it 'raises Norikra::ArgumentError for invalid name' do
      expect(Norikra::Target.valid?('foobar')).to be_true
      expect(Norikra::Target.valid?('FooBar')).to be_true
      expect(Norikra::Target.valid?('foo_bar')).to be_true
      expect(Norikra::Target.valid?('foo_bar_baz')).to be_true

      expect(Norikra::Target.valid?('')).to be_false
      expect(Norikra::Target.valid?('.')).to be_false
      expect(Norikra::Target.valid?('_')).to be_false
      expect(Norikra::Target.valid?('_a_')).to be_false
      expect(Norikra::Target.valid?('foo_')).to be_false
      expect(Norikra::Target.valid?('_Foo')).to be_false
      expect(Norikra::Target.valid?('foo bar')).to be_false
      expect(Norikra::Target.valid?('_Foo')).to be_false
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
norikra-0.0.13-java spec/target_spec.rb
norikra-0.0.12-java spec/target_spec.rb