Sha256: e5d481d09f407ef768a45946b8a942f81d2fe00bda078b3377b7dc7bfc542b81

Contents?: true

Size: 724 Bytes

Versions: 6

Compression:

Stored size: 724 Bytes

Contents

describe UnderOs::UI::Progress do
  before do
    @progress = UnderOs::UI::Progress.new
  end

  describe '#initialize' do
    it "should build a spinner" do
      @progress.class.should == UnderOs::UI::Progress
    end

    it "should wrap the UIProgressView" do
      @progress._.class.should == UIProgressView
    end

    it "should have the correct tag name" do
      @progress.tagName.should == 'PROGRESS'
    end

    it "should accept the 'value' option" do
      progress = UnderOs::UI::Progress.new(value: 0.4)
      progress.value.should == 0.4
    end
  end

  describe '#value' do
    it "should assign values correctly" do
      @progress.value = 0.6
      @progress._.progress.should == 0.6
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
under-os-ui-1.4.0 spec/under_os/ui/progress_spec.rb
under-os-1.3.0 spec/lib/under_os/ui/progress_spec.rb
under-os-1.2.1 spec/lib/under_os/ui/progress_spec.rb
under-os-1.2.0 spec/lib/under_os/ui/progress_spec.rb
under-os-1.1.0 spec/lib/under_os/ui/progress_spec.rb
under-os-1.0.0 spec/lib/under_os/ui/progress_spec.rb