Skip to content

Instantly share code, notes, and snippets.

@banister
Created October 26, 2010 15:30
Show Gist options
  • Save banister/647120 to your computer and use it in GitHub Desktop.
Save banister/647120 to your computer and use it in GitHub Desktop.
require 'rubygems'
require '../lib/remix'
require 'bacon'
describe 'Test basic remix functionality' do
before do
class Module
public :include
end
A = Module.new
B = Module.new
C = Module.new
M = Module.new
M.include A, B
end
it 'include_after' do
M.include_after A, C
M.ancestors[2].should.equal C
end
it 'include_before' do
M.include_before B, C
M.ancestors[2].should.equal C
end
after do
remove_const(:A)
remove_const(:B)
remove_const(:C)
remove_const(:M)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment