Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.64 KB  |  views: 5  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. require 'rubygems'
  2. require '../lib/remix'
  3. require 'bacon'
  4.  
  5. describe 'Test basic remix functionality' do
  6.   before :each do
  7.     class Module
  8.       public :include
  9.     end
  10.    
  11.     @a = Module.new
  12.     @b = Module.new
  13.     @c = Module.new
  14.   end
  15.  
  16.   subject { Module.new.include @a, @b }
  17.  
  18.   describe 'include_after' do
  19.     it "should place the module in the correct position" do
  20.       subject.include_after @a, @c
  21.       subject.ancestors[2].should.equal @c
  22.     end
  23.   end
  24.  
  25.   describe 'include_before' do
  26.     it "should place the module in the correct position" do
  27.       subject.include_before @b, @c
  28.       subject.ancestors[2].should.equal @c
  29.     end
  30.   end
  31. end
clone this paste RAW Paste Data