GithubHelp home page GithubHelp logo

Comments (9)

wied03 avatar wied03 commented on August 17, 2024
  1. Are you using opal-rspec 0.5?
  2. Have you looked @ the note under 'Opal load path' on the README?

from opal-rspec.

wied03 avatar wied03 commented on August 17, 2024

I might be able to make this more clear in the README, but if your specs are still in 'spec' and you're just trying to add 'opal' to your load path, then you would do something like this:

Opal::RSpec::RakeTask.new(:default) do |server, task|
  server.append_path 'opal'
end

from opal-rspec.

merongivian avatar merongivian commented on August 17, 2024

this works on opal-rspec 0.4.3, thanks 👍, i got this error in version 0.5 though, here is the output

Running phantomjs /Users/Jose/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/opal-rspec-0                                                                                          
.5.0/vendor/spec_runner.js "http://localhost:9999/"                                                                                                                                
opal-rspec - checking pp/pretty print features                                                                                                                                     
TypeError: 'undefined' is not an object (evaluating 'system.stdout.write')                                                                                                         

  /Users/Jose/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/opal-rspec-0.5.0/vendor/spec                                                                                          
_runner.js:21                                                                                                                                                                      
  :/modules/webpage.js:143                                                                                                                                                         
Specs timed out 

i'll just use 0.4.3 for now , i'll probably open a new issue for this, thank you very much :)

from opal-rspec.

wied03 avatar wied03 commented on August 17, 2024

0.4.3 is pretty dated so if you can give more details (opal version, code sample, etc.) about reproducing that error w/ 0.5, that would be great.

from opal-rspec.

merongivian avatar merongivian commented on August 17, 2024

Im creating specs for a gem, this is the rakefile (with the changes u suggested):

# Rakefile
require 'opal/rspec/rake_task'

Opal::RSpec::RakeTask.new(:default) do |server, task|
  server.append_path 'opal'
end

i have this one (dummy) test, which needed the music/note file under opal:

require 'music/note'

describe Music::Note do
  describe 'assertion' do
    it 'is true' do
      described_class.new 'F2 w'
      expect(true).to be true
    end
  end
end

when running bundle exec rake i got this error

.5.0/vendor/spec_runner.js "http://localhost:9999/"                                                                                                                                
opal-rspec - checking pp/pretty print features                                                                                                                                     
TypeError: 'undefined' is not an object (evaluating 'system.stdout.write')                                                                                                         

  /Users/Jose/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/opal-rspec-0.5.0/vendor/spec                                                                                          
_runner.js:21                                                                                                                                                                      
  :/modules/webpage.js:143                                                                                                                                                         
JSpecs timed out          

Im using opal 0.8.0

from opal-rspec.

wied03 avatar wied03 commented on August 17, 2024

What version of phantomjs are you running? (phantomjs -v)

from opal-rspec.

merongivian avatar merongivian commented on August 17, 2024

@wied03 1.8.2

from opal-rspec.

wied03 avatar wied03 commented on August 17, 2024

at least 1.9.8 is required (we don't test below that). Can you try upgrading and see if that fixes the issue?

from opal-rspec.

merongivian avatar merongivian commented on August 17, 2024

@wied03 sorry for the late response, yea indeed using phatomjs 1.9.8 make it work, thanks 😄

from opal-rspec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.