Skip to content

Instantly share code, notes, and snippets.

@ndmanvar
Created July 22, 2010 00:55
Show Gist options
  • Save ndmanvar/485426 to your computer and use it in GitHub Desktop.
Save ndmanvar/485426 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))),
'external/dist/share/service_testing/bp_service_runner.rb')
require 'uri'
require 'test/unit'
require 'open-uri'
class TestPStore < Test::Unit::TestCase
def setup
@cwd = File.dirname(File.expand_path(__FILE__))
@interpService = File.join(@cwd, "../src/build/RubyInterpreter")
end
def teardown
end
def test_Pstore
#@s = BrowserPlus::Service.new(File.join(@cwd, "Pstore"))
serviceLoc = File.join(ENV["HOME"], "Library", "Application Support",
"Yahoo!", "BrowserPlus", "Corelets")
@rad = File.join(serviceLoc, "PStore", "1.0.10")
@rubyrad = File.join(serviceLoc, "RubyInterpreter", "4.2.6"
BrowserPlus.run(@rad, @rubyrad){ |s|
curDir = File.dirname(__FILE__)
textfile_path = File.expand_path(File.join(curDir, "services.txt"))
textfile_path = 'path:'+textfile_path
tp = "file:///"+textfile_path
@filesarg = Hash.new
@filesarg['key1'] = textfile_path
s.set({'key'=>"This is the key", 'value'=> 5 })
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment