<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/merb_facebooker/helpers.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1 +1,2 @@
 pkg
+.DS_STORE</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,10 @@
 # make sure we're running inside Merb
 require 'merb_facebooker/controller'
+require 'merb_facebooker/helpers'
 
 if defined?(Merb::Plugins)
   dependency &quot;facebooker&quot;
+  dependency &quot;merb_helpers&quot;
   
   # Merb gives you a Merb::Plugins.config hash...feel free to put your stuff in your piece of it
   facebook_config = &quot;#{Merb.root}/config/facebooker.yml&quot;
@@ -18,6 +20,7 @@ if defined?(Merb::Plugins)
   
   Merb::BootLoader.before_app_loads do
     Merb::Controller.send(:include, Facebooker::Merb::Controller) 
+    Merb::Controller.send(:include, Facebooker::Merb::Helpers)
     # require code that must be loaded before the application
   end
   </diff>
      <filename>lib/merb_facebooker.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,63 @@
 require File.dirname(__FILE__) + '/spec_helper'
 
-describe &quot;merb_facebooker&quot; do
-  it &quot;should do nothing&quot; do
-    true.should == true
+Merb::Router.prepare do |r|
+  r.match('/').to(:controller =&gt; 'facebook_helpers', :action =&gt;'index')
+end
+
+class FacebookerHelpers &lt; Merb::Controller
+  def index
+    &quot;hi&quot;
+  end
+end
+
+Merb::Config.use { |c|
+  c[:framework]           = {},
+  c[:session_store]       = 'none',
+  c[:exception_details]   = true
+}
+
+# ok lets start with the helpers and go from there
+describe &quot;Controller With Facebooker Helpers&quot; do
+  before(:all) do
+    @controller = FacebookerHelpers.new(fake_request)
+  end
+  
+  describe &quot;calling fb_profile(@user, options) given user has facebook_id=1234&quot; do
+    before(:all) do
+      @user = stub(&quot;User&quot;, :facebook_id =&gt; 1234)
+    end
+    
+    it &quot;should be able to call&quot; do
+      @controller.should respond_to(:fb_profile_pic)
+    end
+  
+    it &quot;should equal &lt;fb:profile-pic uid='1234' /&gt; when calling with @user&quot; do
+      @controller.fb_profile_pic(@user).should == &quot;&lt;fb:profile-pic uid=\&quot;1234\&quot;/&gt;&quot;
+    end
+  
+    it &quot;should equal &lt;fb:profile-pic uid='1234' size='small'/&gt; when calling with @user, :size =&gt; :small&quot; do
+      @controller.fb_profile_pic(@user, :size =&gt; :small).should == &quot;&lt;fb:profile-pic uid=\&quot;1234\&quot; size=\&quot;small\&quot;/&gt;&quot;
+    end
+  
+    it &quot;should raise Argument Error is the incorrect size is given when calling @user, :size =&gt; :egg&quot; do
+      lambda{@controller.fb_profile_pic(@user, :size =&gt; :egg)}.should raise_error
+    end
+  end
+  
+  
+  describe &quot;calling fb_photo where given photo has an photo_id = 1234&quot; do
+    before(:all) do
+      @photo = stub(&quot;Photo&quot;, :photo_id =&gt; 1234)
+    end
+    
+    it &quot;should be able to call&quot; do
+      @controller.should respond_to(:fb_photo)
+    end
+    
+    it &quot;should equal &lt;fb:photo pid=\&quot;1234\&quot; /&gt; with parameter @photo&quot; do
+      @photo.stub!(:photo_id).and_return(1234) # DONT ASK
+      @controller.fb_photo(@photo).should == &quot;&lt;fb:photo pid=\&quot;1234\&quot;/&gt;&quot;
+    end
   end
+  
 end
\ No newline at end of file</diff>
      <filename>spec/merb_facebooker_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,16 @@
 $TESTING=true
-$:.push File.join(File.dirname(__FILE__), '..', 'lib')
\ No newline at end of file
+$:.push File.join(File.dirname(__FILE__), '..', 'lib')
+
+# going to be specing for Merb so lets just do that shall we
+require 'rubygems'
+require 'merb-core'
+require 'merb_facebooker'
+require 'spec'
+
+Merb.start_environment(:testing =&gt; true, :adapter =&gt; 'runner', :environment =&gt; ENV['MERB_ENV'] || 'test')
+
+Spec::Runner.configure do |config|
+  config.include(Merb::Test::ViewHelper)
+  config.include(Merb::Test::RouteHelper)
+  config.include(Merb::Test::ControllerHelper)
+end
\ No newline at end of file</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>514407cfdf355172d4df415c80d94727210d37aa</id>
    </parent>
  </parents>
  <author>
    <name>hookercookerman</name>
    <email>hookercookerman@gmail.com</email>
  </author>
  <url>http://github.com/vanpelt/merb_facebooker/commit/01f265ae3ada1c78ff4062866eb6cf1e3a64a55b</url>
  <id>01f265ae3ada1c78ff4062866eb6cf1e3a64a55b</id>
  <committed-date>2008-12-15T20:11:31-08:00</committed-date>
  <authored-date>2008-04-22T11:10:21-07:00</authored-date>
  <message>Helper are on the way

Signed-off-by: Chris Van Pelt &lt;vanpelt@gmail.com&gt;</message>
  <tree>9e88d9ed4b6a15674ecde97d8426706afa312175</tree>
  <committer>
    <name>Chris Van Pelt</name>
    <email>vanpelt@gmail.com</email>
  </committer>
</commit>
