Giter Club home page Giter Club logo

Comments (14)

bratsche avatar bratsche commented on July 23, 2024

Actually, upon closer inspection this is not the problem.

bio_markup includes the original text which the user wrote.
bio is bio_markup as rendered by textile into html.

So when best_in_place is rendering the contents of bio, something is getting confused. If the user wrote:

I'm editing with bip

Then the bio field stores "

Iā€™m editing with bip". Inspecting the JS at runtime, this.original_content is just showing "I". It seems like the HTML code is confusing things somewhere.

I'll keep trying to read through things and understand what's not working.

from best_in_place.

albertbellonch avatar albertbellonch commented on July 23, 2024

Hello @bratsche,

Could you open a new branch an commit a failing spec for that case? You can use user's show view, in a similar fashion to other integration tests.

We'll be happy to check what's the problem and fix it.

Thank you,

from best_in_place.

bratsche avatar bratsche commented on July 23, 2024

Sure, I'd be happy to try to do that. I'm not quite sure how to setup the testing environment for bip though. I git cloned it, did bundle install, installed rspec.. then ran "bundle exec rspec". I get a lot of errors, which makes me assume I did something wrong.

ludwig:best_in_place cody$ bundle exec rspec
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF....FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

from best_in_place.

albertbellonch avatar albertbellonch commented on July 23, 2024

Hi @bratsche,

Can you provide the backtrace for these failing tests? The backtrace error should include some reason explaining why the tests are not passing.

By the way, I'm running the tests by doing bundle exec rspec spec/, if it is useful to you.

from best_in_place.

bratsche avatar bratsche commented on July 23, 2024

Hi @albertbellonch

I'm getting a lot of errors saying "Could not find table 'users'", so I must have missed a step on setting up the db for testing.

  1) BestInPlace::BestInPlaceHelpers#best_in_place should generate a proper span
     Failure/Error: @user = User.new :name => "Lucia",
     ActiveRecord::StatementInvalid:
       Could not find table 'users'
     # ./spec/helpers/best_in_place_spec.rb:7:in `new'
     # ./spec/helpers/best_in_place_spec.rb:7:in `block (3 levels) in <top (required)>'

from best_in_place.

albertbellonch avatar albertbellonch commented on July 23, 2024

Hi @bratsche,

You simply haven't your database up to date. Tests implying models are in the test_app; thus, these tests use test_app's database.

Please go to the test_app folder and run bundle exec rake db:schema:prepare in order to set up your . This should work.

from best_in_place.

bratsche avatar bratsche commented on July 23, 2024

I don't see a db:schema:prepare rake task. There is a db:schema:load rake task, so I ran that.. but it did not appear to fix the problem.

from best_in_place.

albertbellonch avatar albertbellonch commented on July 23, 2024

Sorry, I mispelled it:

bundle exec rake db:test:prepare

from best_in_place.

bratsche avatar bratsche commented on July 23, 2024

Perfect, thank you! Now I only see two errors in the tests, everything else works perfectly.

I will try to create a test to reproduce the problem I'm having now. Thank you!

from best_in_place.

albertbellonch avatar albertbellonch commented on July 23, 2024

Can you tell me which tests are failing now?

I have no failing specs locally, neither are in Travis CI (http://travis-ci.org/#!/bernat/best_in_place).

from best_in_place.

bratsche avatar bratsche commented on July 23, 2024

I'm sorry, I was mistaken. When I was trying to figure out how to run the tests I tried to run "rake test" from within the test_app directory, and there are two errors there. I still had those in my terminal window and mistakenly thought they were part of the rspec that I had just run.

from best_in_place.

shioyama avatar shioyama commented on July 23, 2024

I noticed the same issue today. If I have time I'll try to dig into it.

from best_in_place.

osuthorpe avatar osuthorpe commented on July 23, 2024

I am having this same error when I use display_with

from best_in_place.

seuros avatar seuros commented on July 23, 2024

related to #331

from best_in_place.

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.