Sha256: 5562da8b2d04981dcfa1f37a480a5f3ab946874e158701be2724c5bd9659fb20

Contents?: true

Size: 1.18 KB

Versions: 1

Compression:

Stored size: 1.18 KB

Contents

require "helper"

class TestGenerator < Test::Unit::TestCase
  context "when setting options" do
    setup do
      @generator = RawQ::Generator.new({:application_name => "RawQorApp"})
    end

    should "set options" do
      assert_equal({:application_name => "RawQorApp"}, @generator.options)
    end

    should "set path" do
      assert_equal ".", @generator.path
    end

    should "set application_name" do
      assert_equal "RawQorApp", @generator.application_name
    end

    should "set default music_dir" do
      assert_equal File.join(@generator.path, "media/music"), @generator.music_dir
    end

    should "set music_dir" do
      generator = RawQ::Generator.new({:application_name => "RawQorApp", :music_dir => "/home/craig/Music"})
      assert_equal "/home/craig/Music", generator.music_dir
    end

    should "set default username" do
      assert_equal "RawQorApp", @generator.username
    end

    should "set username" do
      generator = RawQ::Generator.new({:application_name => "RawQorApp", :username => "username"})
      assert_equal "username", generator.username
    end

    should "set password" do
      assert_equal 8, @generator.password.length
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rawq-0.1.0 test/rawq/test_generator.rb