File: motion_require_spec.rb

package info (click to toggle)
ruby-motion-require 0.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 140 kB
  • sloc: ruby: 157; makefile: 7
file content (23 lines) | stat: -rw-r--r-- 743 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'spec_helper'

describe Motion::Require do
  it 'should run' do
    true.should == true
  end

  describe 'should check_platform' do
    it 'should support `nil`' do
      Motion::Require.check_platform(:ios, nil).should == true
    end
    it 'should support Symbol' do
      Motion::Require.check_platform(:ios, :ios).should == true
      Motion::Require.check_platform(:ios, :osx).should == false
    end
    it 'should support Array' do
      Motion::Require.check_platform(:ios, [:ios]).should == true
      Motion::Require.check_platform(:ios, [:ios, :osx]).should == true
      Motion::Require.check_platform(:osx, [:ios, :osx]).should == true
      Motion::Require.check_platform(:ios, [:osx]).should == false
    end
  end
end