Guest User

Untitled

a guest
Feb 27th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment